P@c_M@n Posted September 10, 2009 Share Posted September 10, 2009 I just got into c++ and im having a bit of trouble with the programming. But theres this one thing with my programming that my c++ complier doesn't seem to allow. Theres this line of code in my program that my compiler classifies as an error. This is it: cout << "Hi there!" << end1; //end1=next line this is the whole code: #include <iostream> using namespace std; int main(int argc, char* argv[]) { //Without "using" statement, this would be std::cout cout << "Hi there!" << end1; // "end" =next line return 0; } I also made another code meant to perform a calculation. But it had the same problem as this. I originally used the program dev C++ and i also tried a program called CodeBlocks. Both display the same error. Can anyone tell me whats wrong with my code? Quote Link to comment Share on other sites More sharing options...
C-S-B Posted September 10, 2009 Share Posted September 10, 2009 I just got into c++ and im having a bit of trouble with the programming. But theres this one thing with my programming that my c++ complier doesn't seem to allow. Theres this line of code in my program that my compiler classifies as an error. This is it: cout << "Hi there!" << end1; //end1=next line this is the whole code: #include <iostream> using namespace std; int main(int argc, char* argv[]) { //Without "using" statement, this would be std::cout cout << "Hi there!" << end1; // "end" =next line return 0; } I also made another code meant to perform a calculation. But it had the same problem as this. I originally used the program dev C++ and i also tried a program called CodeBlocks. Both display the same error. Can anyone tell me whats wrong with my code? It looks incredibly much like you are using the number one instead of a lowercase L. I find cout << "Hello there!\n"; easier to read. Quote Link to comment Share on other sites More sharing options...
P@c_M@n Posted September 10, 2009 Author Share Posted September 10, 2009 Thanks. It worked. The one looked a lot like a lowercase L. My apologies for looking like a total noob. Quote Link to comment Share on other sites More sharing options...
C-S-B Posted September 10, 2009 Share Posted September 10, 2009 Thanks. It worked. The one looked a lot like a lowercase L. My apologies for looking like a total noob. No problems and yes, you did. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.