operator + is better written as a nonmember which kicks down to the member operator +=. For a full discussion on why some operators are better written as nonmenbers read this.
That is a 'template typedef'. Up until C++0x they didn't exist, and I am not sure if they exist in C++0x either. They can be simulated somewhat, details here and here.
Most bugs dont cause the compiler to spit out an error. Most occur during runtime. For this you need to attach the debugger and step through your code watching the variables closely as i have already...
Are all the cuboids filled to capacity with water?
If so surely its just adding up the volume of each of the specific cuboids with the volume of each cuboid being given by the formula length * width...
1. ArrayQueue - There is no direct C++ version but you can get close by using std::queue<T> which is based around a deque.
2. ListQueue - Use std::queue< T, std::list<T> > - queue using a doubly...
IDE's have nothing to do with text processing, I just answered your 'what is codeblocks' question.
For text processing, what do you want to do?
Its already been answered. What is wrong with the...
No. Its an IDE, an integrated development environment. Generally these consist of a code editor, a build system, a debugger, a compiler and a linker. See here.
Use your debugger and find out. Learning to debug your code is part of learning to program. work out on pen and paper what values you expect in variables and watch to see whats actually happening as...
the variables you pass into the function are all GLOBAL. that means they can be accessed from everywhere. The only parameter that function needs is the filename. fscanf is slightly different to...
In ReadFile you should be reading from a file not from the keyboard. Surely those scanf's should be fscanf's. Also drop the ncircles parameter completely as that variable is global as are s and t...
My god, this is C++ not BASIC. Remove those gotos and replace them with loops and conditionals.
C++ supports 3 types of loop, they are counted (for loop), top tested (while loop ) and bottom tested...
Personally I think that STL use should be taught before dynamic allocation. Of course you need to learn both but why start with the more low level concept. Should we all learn asm before C++? No, of...
I think code like this could be a problem. free wont call destructors and replacing it with delete[] wont work as realloc will not do new[]'s bookkeeping. Could lead to resource leaks if the type...
post a small but complete example that exhibits the problem (inside code tags). Try to cut down your code to just the bare essentials, dont dump the lot on us.