| | |
New to C++, need help
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2004
Posts: 9
Reputation:
Solved Threads: 0
hi im new to c++ (started today) and im reading a book about c++ (called C++ Programming A)
Well i started to read and learned the first code and wrote it in Microsoft Visual C++ and i get a error (error C2065: 'cout' : undeclared identifier) i dont know why cause ive written exactly what it says in the book, and can post the code to
# include <iostream>
int main ()
{
int tal1=5, tal2=11, produkt;
produkt=tal1*tal2;
cout << "Produkten är" << produkt;
}
one more question what am i supposed to write in () after int main.?
Thanks in forehand ( and by the way a great forum)
Well i started to read and learned the first code and wrote it in Microsoft Visual C++ and i get a error (error C2065: 'cout' : undeclared identifier) i dont know why cause ive written exactly what it says in the book, and can post the code to
# include <iostream>
int main ()
{
int tal1=5, tal2=11, produkt;
produkt=tal1*tal2;
cout << "Produkten är" << produkt;
}
one more question what am i supposed to write in () after int main.?
Thanks in forehand ( and by the way a great forum)
ya im gona start c++ soon, cause every one tells me to, but ill promise you 1 thing. I know nothing. Im starting from scratch, but what should i already know. Html, perl ect. cause i dont know either. I was recomendd to learn perl first, but then c++ from another guy, then Qbasic from another. IM SO CONFUSED!. lol.
whats C/c++ for
Whats Qbasic or basic for
whats Perl for
whats open gl for
whats DirectX for
whats C/c++ for
Whats Qbasic or basic for
whats Perl for
whats open gl for
whats DirectX for
is this a dream
We should all respect Dani, shes the admin and she does a damn good job!. Not to forget the rest of the mod's =)
http://img.photobucket.com/albums/v5...46/Sphyenx.jpg
We should all respect Dani, shes the admin and she does a damn good job!. Not to forget the rest of the mod's =)
http://img.photobucket.com/albums/v5...46/Sphyenx.jpg
•
•
Join Date: Aug 2004
Posts: 9
Reputation:
Solved Threads: 0
ok i fixed it now but got one more question (heres the final code i used) when i click run the program it opens but it closes itself in about 0.01 sec after it have opened. whats the wrong now with the code, and i dont get any errors when compiling.
# include <iostream>
int main()
{
using namespace std;
int tal1, tal2, produkt;
tal1=5;
tal2=11;
produkt=tal1*tal2;
cout <<"Produkten är" << produkt;
}
# include <iostream>
int main()
{
using namespace std;
int tal1, tal2, produkt;
tal1=5;
tal2=11;
produkt=tal1*tal2;
cout <<"Produkten är" << produkt;
}
![]() |
Other Threads in the C++ Forum
- Previous Thread: Sending and receiving ARP packets
- Next Thread: sorting stl::map
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





