| | |
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 |
Tag cloud for C++
api application array arrays assignment based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





