Thread: Error...

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    12

    Unhappy Error...

    Im using MSVC++ and after severly attempts at correcting mistakes it says "error C2001: newline in constant" or somethign like that, and unless I put a ; in front of all my couts it come up as an error. Why is that?

    Thanks,
    Gutty

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    It means you probably forgot to close a string literal:
    Code:
    cout<<"Testing<<endl;
    cout<<"1..2..3.."<<endl;
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    12
    Waoh that was really fast. You mean I didn't put ; at the end of each line? I do though, it says the ; has to be BEFORE the cout. Very weird.


  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    12
    Wait, I think i got it! Thanks alot man!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM