NULL is more likely to be (void*)0. But if the variable is an int you should use 0, if it's a pointer you should use NULL. It's a bad idea to try and use NULL in any context other than pointers.
Type: Posts; User: 12938451357
NULL is more likely to be (void*)0. But if the variable is an int you should use 0, if it's a pointer you should use NULL. It's a bad idea to try and use NULL in any context other than pointers.
It doesn't get better than http://forum.java.sun.com/
I wasn't talking about fast food either. I can think of several nice sit down bring you dinner restaurants that I can get just about anything for less than $20. ;)
Wow, you people eat expensive. I can usually get a big meal at an okay restaurant for like $15.
> if (fgets(word, sizeof word, stdin) != NULL)
> if(fgets(word, sizeof(word), stdin, != NULL)
compiles great both ways.
can someone explain why sizeof(word) and sizeof word are the same...
#include <iterator>
#include <vector>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
int main()
{
Clearly he doesn't or he wouldn't be asking. The problem is that limit in this context is a copy of the limit that was passed to the function. It needs to be a reference for any changes to take...
Here's bubble sort, but you're better off doing the insertion sort since it's more useful
#include <iostream>
using namespace std;
int main()
{
int a[] = {5,4,7,6,3,7,1};
Works for me like this
#include <iostream>
#include <fstream>
#include <iterator>
using namespace std;
int main()
C doesn't have new and delete operators. You want to post this in the C++ forum. :)
>So I just guessed you could figure it out.
If size() and length() didn't work then I had to assume you were doing something wrong or not using the std::string. Most likely your problem is that...