![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programmer
Join Date: Jun 2005
Posts: 92
Rep Power: 4
![]() |
Here is what you need to do:
cin >> i [code]#include <iostream> #include <cstdio> using namespace std; int main() { ...... cout << endl; system("PAUSE"); return 0; } |
|
|
|
|
|
#12 |
|
Expert Programmer
|
That code looks fine to me, try putting in this code, before return 0;
cout<<"Type Q to quit"; cin.get();
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#13 |
|
Programmer
Join Date: Jun 2005
Posts: 92
Rep Power: 4
![]() |
ahhhhhhhhhh, don't post late at night.... sorry, I forgot to close the code thingy.
|
|
|
|
|
|
#14 |
|
Programmer
Join Date: Oct 2005
Posts: 49
Rep Power: 0
![]() |
grrrrrrr WTF is wrong im starting to get pissed :mad:
#include <iostream>
int main()
using namespace std;
{
int i;
cout << "please enter an integer value: ";
cin >> i;
cout << " \n the value you entered is" << i;
cout << "and its double is...\n ";
cout << i*2;
return 0;
} |
|
|
|
|
|
#15 |
|
Expert Programmer
|
What is happenning that you don't want?
What errors are you getting, if any?
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#16 |
|
Programmer
Join Date: Oct 2005
Posts: 49
Rep Power: 0
![]() |
Im starting to think that the tutorial sucks balls. It wont even compile :mad:
|
|
|
|
|
|
#17 |
|
Expert Programmer
|
As i said before, what errors do you get when compiling?
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#18 |
|
Programmer
Join Date: Oct 2005
Posts: 49
Rep Power: 0
![]() |
#include <iostream>
int main()
{
int i ;
cout << "please enter an integer value: " ; //Cout undeclared (first use
// this function)
cin >> i;
cout << " \n the value you entered is" << i;
cout << "and its double is...\n ";
cout << i * 2;
return 1;
}ok when i try to compile it it just does nothing then highlight the ling that i put the comment in and says waht i put in the comment. |
|
|
|
|
|
#19 |
|
Expert Programmer
|
put in : using namespace std;
and replace return 1; with return 0;
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#20 |
|
Programmer
Join Date: Oct 2005
Posts: 49
Rep Power: 0
![]() |
now it highlight the using namespace std; line in red.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|