c2061 error

This is a discussion on c2061 error within the Windows Programming forums, part of the Platform Specific Boards category; i get the error Code: error C2061: syntax error : identifier '{ctor}' when trying to compile the second and third ...

  1. #1
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227

    c2061 error

    i get the error
    Code:
    error C2061: syntax error : identifier '{ctor}'
    when trying to compile the second and third lines of this snippet in visual c++ 2005 with all the default compiler options set with a windows form application project:

    Code:
    String^ path = String::Concat(directory->Text,origName->Text);
    FileStream^ fs = gcnew FileStream::FileStream(path,FileMode::Open,FileAccess::Read);
    FileInfo^ fi = gcnew FileInfo::FileInfo(path);
    i tried going through the msdn kb, but i couldn't figure out what was wrong. i also googled it, but still couldn't figure it out.
    Keyboard Not Found! Press any key to continue. . .

  2. #2
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227
    oooh i get it ..... im stupid .... i wasn't supposed to do FileStream::FileStream(), just FileStream()
    Keyboard Not Found! Press any key to continue. . .

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, 09:18 PM
  2. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 03:49 PM
  3. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 07:33 AM
  4. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 09:57 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21