Beginners - August 2014 (Page 2)

Finding errors in code
 
I'm doing a practice problem and I'm told there are 4 syntax errors and 2 logical errors in the code below, starting below the body of the main. I labelled what...
[5 replies] Last: So, wouldn't I technically have three logical errors? I had to put a c... (by hellworld136)
MASM Program
 
I know this is a C++ forum, but I'm new to the forum world and don't know where to post something about assembly language, so I thought I'd try it out here and ...
[1 reply] : Here's an assembly forumish thing I found: http://www.dreamincode.net/... (by GaiusBaltar)
weird for loop error
 
I'm using VS 2012. Does anyone know why I'm getting an error on the x in tempArray on the third line? The error is: "ERROR: identifier x is undefined". ...
[2 replies] Last: LOL!! Thankyou Gaius!! Looks like I have semi colon blindness!! Thanks... (by Khillz3000)
Question about arrays
 
In the code below, I'm asked what the function fo(int c , int d ) will do. The function below has 3 arguments however, so I'm unsure if it's a typo. If it i...
[3 replies] Last: Yes it reverses the array. Should I also say, assuming c and d are e... (by giblit)
bool question
 
What does it mean when it says if(!b)? // Example program #include <iostream> #include <string> void fi(int& a, int& b, int c); int main() { int x=13; int y=...
[7 replies] Last: I'm doing a practice question with given values for a, b, and c and ju... (by hellworld136)
Why does my iterator go out of bounds?
 
I'm trying to write a simple directory program. I have a class called Entry, which is stored in a vector<Item> directory. I can add and search entries, but I'm ...
[3 replies] Last: Ack, I found the problem...it was in the cout message, which was still... (by slouchcouchgamer)
reducing the time
 
hi imagine we Get two diffrent times with <ctime> like this : Sun Aug 31 00:09:38 2014 Sun Aug 31 00:25:34 2014 i want to know how to reduce only cloc...
[1 reply] : You mean something like this: http://www.cplusplus.com/reference/ctime... (by admkrk)
by h4ever
how to use the library
 
I have created project in code blocks and I linked the refu.dll library. This is the code for the project and it includes sources for refu library: https://gi...
[no replies]
literature
 
New to c++, could anyone recommend a book that covers the basics and a little beyond. Thank you
[3 replies] Last: Thanks. Stackoverflow looks great. (by ajgbyrne)
by h4ever
unknown type
 
how to fix this error? error: unknown type name 'bool' bool readArguments(int argc, char *argv ,char** imgName,uint32_t* gaussianSize,float* gaussianSigma);...
[2 replies] Last: I am using gcc, but it works. thanks (by h4ever)
by EvE12
Private accessing fail..
 
I just wanted to know why ( double answer ) is not working it just give me the garbage numbers instead of adding here is the code #include <iostream>...
[2 replies] Last: Fair Enough, Sorry I am too new for this things.. Thanks brother, Yo... (by EvE12)
by vxk
delete operator
 
what is the difference b/w the 2 delete statements in the following code: double* pp =new double ; /*statement 1*/ delete pp; /*statement 2*/ ...
[6 replies] Last: > prior to c++11 where stuff like smart pointer were not thereā€¦. Sm... (by JLBorges)
Vector with mixed class type?
 
I'm trying to write a basic RPG style battle system to practice classes, but I'm having a little trouble with creating an inventory system. To keep things simp...
[11 replies] Last: You can also use a double dispatch pattern and avoid casting entirely.... (by Lowest0ne)
Program closing error
 
I am trying to prepare a simple converter that reads data from a file and then rearranges the data followed by its writing work in a different file. I have ...
[5 replies] Last: Have you considered using a structure to hold this data? That should m... (by jlb)
else if vs if
 
Having trouble. Whats the difference between "if" and "else if"? If I'm going to make a "nested if statement" does it affect the usage of "if" and "else if"? ...
[5 replies] Last: Thanks. (by iamnoob15)
Increment
 
Hi, Can somebody explain to me, how does the below code works? The answer is 8, 10 and 9 respectively but I don't know how to get to the answer. int k =...
[1 reply] : http://en.cppreference.com/w/c/language/operator_incdec (by keskiverto)
In any c++ compiler, is this allowed?
 
In a "nested if statement" is this ok? Although I didn't put the cout statement inside the {} ? if (m=='a') { if ((n<=19)&&(n>=1)) cout<<"Your zodiac...
[2 replies] Last: Thank you very much. (by iamnoob15)
by ephekt
attach function
 
i am having a problem with this attach function, it is supposed to attach a new number to the end of a list of numbers. It is actually putting the new number at...
[6 replies] Last: it works now void sequence::attach(const value_type& entry) { ... (by ephekt)
template question
 
Write your question here. template <class T> T Max(T a, T b) { cout <<"template:"; return a < b ? b: a; } #include<iostream.h> int Max(int x,...
[1 reply] : It looks like you are using an old compiler. It should give an error. ... (by Peter87)
Whats wrong with this?
 
#include <iostream> using namespace std; int main() { char a,b,c,d,e,f,g,h,i,j,k,l,m; int n; cout<<"Enter your Birth Month.Press: "<<endl; ...
[2 replies] Last: yes. It's ok now, the output has shown already. Thank you sir. I'm s... (by iamnoob15)
August 2014 Pages: 1234... 40
  Archived months: [jul2014] [sep2014]

This is an archived page. To post a new message, go to the current page.