Forum: C++ Oct 21st, 2008 |
| Replies: 12 Views: 966 Also in addition to the braces, your logic is messed up. See the comments in your code.
for ( int i = 2 ; i < num; i++ )
/* you can add a special case for 2, you only need to check for... |
Forum: C++ Oct 16th, 2008 |
| Replies: 2 Views: 367 You need to post the link errors you are getting from the compiler so that we can help you. |
Forum: C++ Oct 16th, 2008 |
| Replies: 4 Views: 405 Not to keep harping on this, but you really need to be careful about the difference between an assignment (=) and a comparison (==).
This means that you are assigning the value of the variable b... |
Forum: C++ Oct 14th, 2008 |
| Replies: 7 Views: 476 As far as I know these errors arise from the illegal quotes you were using. If you fix all of those, then it should compile correctly. Can you paste your Parse.cpp code if its not too long ? |
Forum: C++ Oct 13th, 2008 |
| Replies: 4 Views: 1,063 To have separate constructors you will need to overload your constructor definition. You cannot have two constructions with the same prototype. One other reason to make your slist and dlist classes... |
Forum: C++ Oct 9th, 2008 |
| Replies: 4 Views: 520 You have to be a little more careful, but this is how you can do it.
int main()
{
int rows, cols;
int **pointer;
cout<<"Enter rows and columns for your 2-D array\n";
cin >> rows >>... |
Forum: C++ Oct 7th, 2008 |
| Replies: 4 Views: 445 These lines here
_cptPoints = new CPt [++_iSize];
_cptPoints = Tmp;
You allocate space for _cptPoints, and then you assign it to Tmp, which means you've now lost the memory pointer... |
Forum: C++ Oct 2nd, 2008 |
| Replies: 19 Views: 3,165 for example on Linux you could compile using
g++ -D_LINUX file.cpp -o output # turns on the #define _LINUX
and on windows using
g++ -D_WIN32 file.cpp -o output #turns on #define _WIN32
... |
Forum: C++ Sep 25th, 2008 |
| Replies: 6 Views: 1,333 As you can see from your messages, your code is segfaulting inside one of the std::string operator = overload functions, which in turn calls strlen.
A segfault is usually an access violation, ie... |
Forum: C++ Sep 23rd, 2008 |
| Replies: 35 Views: 6,420 What about using fread() to read a large buffer and then write it out ? |