I added it.
I didn't even bother to add C++ in 21 days. Personally I think that tutorial sucks... =/
A good tip to be here:
Buy a notebook (not a PC, a notebook, that thing you use to write with pen or pencial at college... lol) and write what you think it's essencial, it will help.
can i ask you how can i edit a dll file? sorry for my noob question
Originally Posted by alerto24
can i ask you how can i edit a dll file? sorry for my noob question
Basically You can't. You could disassemble using IDA Pro/OllYDbg or the like, but that is quite complicated and not something you'd be doing in a day, depending of course on the complexity of the DLL. Knowledge of assembly is needed. Basically you aren't editing the DLL, but rather remaking it :/
C primer edition 5 is good but for some reason everything I try in there closes its self
before I can complete for example:
// getinfo.cpp -- input and output #include <iostream>
int main()
{
using namespace std;
int carrots;
cout << “How many carrots do you have?” << endl;
cin >> carrots; // C++ input
cout << “Here are two more. “;
carrots = carrots + 2;
// the next line concatenates output
cout << “Now you have “ << carrots << “ carrots.” << endl;
return 0;
}
Right after I type how may carrots it closes,
I even tried adding cin.get(); still happens though any ideas?
Originally Posted by =Advocate=
C primer edition 5 is good but for some reason everything I try in there closes its self
before I can complete for example:
// getinfo.cpp -- input and output #include <iostream>
int main()
{
using namespace std;
int carrots;
cout << “How many carrots do you have?” << endl;
cin >> carrots; // C++ input
cout << “Here are two more. “;
carrots = carrots + 2;
// the next line concatenates output
cout << “Now you have “ << carrots << “ carrots.” << endl;
return 0;
}
Right after I type how may carrots it closes,
I even tried adding cin.get(); still happens though any ideas?
did you put cin. get () just before return 0;?
Yes I did.
I did it like this:
#include <isostream>
int main()
{
usingnamespace std;
int carrots;
cout <<"how many carrots do you have?" <<endl; I like \n better :O
cin >> carrots + 2;
cout << "Now you have " << carrots << " carrots." <<endl;
cin.get();
return 0;
}
using namespace std; should be right after #include iostream and not in int main maybe that is the problem
Hmm even though i changed it it still happends.
Originally Posted by =Advocate=
Hmm even though i changed it it still happends.
post the exact same source code you are compiling
Keep in mind I'm using Visual C++ 2008 Express Edition.
using namespace std;
int main()
{
int carrots;
cout << "How many carrots do you have?" << endl;
cin >> carrots;
cout << "Here are two more. ";
carrots = carrots + 2;
cout << "Now you have " << carrots << " carrots." << endl;
cin.get();
return 0;
}
Originally Posted by =Advocate=
Keep in mind I'm using Visual C++ 2008 Express Edition.
using namespace std;
int main()
{
int carrots;
cout << "How many carrots do you have?" << endl;
cin >> carrots;
cout << "Here are two more. ";
carrots = carrots + 2;
cout << "Now you have " << carrots << " carrots." << endl;
cin.get();
return 0;
}
occasionally I get these problems too. I think it happens when I run Google Desktop in the background. This is why I just use system("pause"); instead of cin.get();
If one cin.get() doesn't work sometimes you need 2. I believe the book outlined things like this near the beginning. And the namespace doesn't have to be under #include, especially in a single function program Like this.
Originally Posted by why06
occasionally I get these problems too. I think it happens when I run Google Desktop in the background. This is why I just use system("pause"); instead of cin.get();
You Sir saved me system("pause"); worked perfectly!
DON'T USE system("pause);
It's not always the greatest choice, as sometimes it refuses to work.
Instead, use cin.get(); twice like this