![]() |
Begginer C++ Error
Hey guys, im just learning C++ and i really want to learn it, but im having some compiling errors and i've looked around and i dont know what else to do. So i was hoping one of you guys could help me out.
so this is my code: Code:
#include <iostream>These are the errors i get when i compile and try to run the file: Code:
c:\users\bioshock\documents\c++\untitled1.cpp: In function `int main()':Thanks. |
Re: Begginer C++ Error
try removing all the std keywords before cin and cout.. tell if it works..
|
Re: Begginer C++ Error
Having the thread in the right forum helps. Moved to C-C++ forum
|
Re: Begginer C++ Error
put the semicolon
sum = integer1 + integer2; |
Re: Begginer C++ Error
first sol :
Code: cpp
second solution: Code: cpp
|
Re: Begginer C++ Error
Oh thanks for the reply's and sorry about having it in the wrong section. I put it in there becuase i thought you couldnt ask questions in the regular programming sections.
|
Re: Begginer C++ Error
Quote:
Code:
using std::cout; |
Re: Begginer C++ Error
your statement std::cout << "Enter first integer\n"; is wrong. Because the keyword ::
is the scope resolution key word. here is incorrect. you should remove it from here. |
Re: Begginer C++ Error
Quote:
http://www.comeaucomputing.com/tryitout/ And here is from latest draft of C++ standard Section 3.3.5.2 Quote:
|
Re: Begginer C++ Error
yes, you are right zamjad. I have write it by mistake. Yes it is not keyword it is scope resolution operator.
sorry for that mistake. |
| All times are GMT +5.5. The time now is 16:37. |