Corrupt Project

Discussion in 'C++' started by Pol, Apr 23, 2007.

  1. Pol

    Pol Guest

    Hi,

    Currently I'm using Visual Studio 2005 .net. I started a new project 2
    weeks ago. The application had no error, but now VS tells me:

    <pre>Fehler 1 error C2143: syntax error : missing ';' before 'using' d:
    \Visual Studio 2005\Projects\thoughtbox\thoughtbox\thoughtbox.cpp 6
    </pre>

    But I never modified anything in this file, and there is even no
    visible error. I don't want to start a new project, as told older
    posts. I even opened the source files in an external editor and saved
    them new.


    Here is the code of thoughtbox.cpp:
    <pre>
    // thoughtbox.cpp : main project file.

    #include "stdafx.h"
    #include "Form1.h"

    using namespace thoughtbox;

    [STAThreadAttribute]
    int main(array<System::String ^> ^args)
    {
    // Enabling Windows XP visual effects before any controls are created
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);

    // Create the main window and run it
    Application::Run(gcnew Form1());
    return 0;
    }
    </pre>
     
    Pol, Apr 23, 2007
    #1
    1. Advertising

  2. Pol

    Ian Collins Guest

    Pol wrote:
    > Hi,
    >
    > Currently I'm using Visual Studio 2005 .net. I started a new project 2
    > weeks ago. The application had no error, but now VS tells me:
    >
    > <pre>Fehler 1 error C2143: syntax error : missing ';' before 'using' d:
    > \Visual Studio 2005\Projects\thoughtbox\thoughtbox\thoughtbox.cpp 6
    > </pre>


    I bet you forgot the semicolon at the end of a class declaration.

    >
    > Here is the code of thoughtbox.cpp:
    > <pre>
    > // thoughtbox.cpp : main project file.
    >
    > #include "stdafx.h"
    > #include "Form1.h"
    >
    > using namespace thoughtbox;
    >
    > [STAThreadAttribute]
    > int main(array<System::String ^> ^args)
    > {

    This isn't C++ code.

    --
    Ian Collins.
     
    Ian Collins, Apr 23, 2007
    #2
    1. Advertising

  3. Pol

    Zeppe Guest

    Pol wrote:
    > Hi,
    >
    > Currently I'm using Visual Studio 2005 .net. I started a new project 2
    > weeks ago. The application had no error, but now VS tells me:
    >
    > <pre>Fehler 1 error C2143: syntax error : missing ';' before 'using' d:
    > \Visual Studio 2005\Projects\thoughtbox\thoughtbox\thoughtbox.cpp 6
    > </pre>
    >
    > But I never modified anything in this file, and there is even no
    > visible error. I don't want to start a new project, as told older
    > posts. I even opened the source files in an external editor and saved
    > them new.
    >
    >
    > Here is the code of thoughtbox.cpp:
    > <pre>
    > // thoughtbox.cpp : main project file.
    >
    > #include "stdafx.h"
    > #include "Form1.h"
    >
    > using namespace thoughtbox;


    Well, I can try to suggest you to check the end of the file Form1.h...
    could there be a missing semicolon or something like that?

    Regards,

    Zeppe
     
    Zeppe, Apr 23, 2007
    #3
  4. Pol

    Pol Guest

    On Apr 23, 10:16 am, Zeppe
    <> wrote:
    > Pol wrote:
    > > Hi,

    >
    > > Currently I'm using Visual Studio 2005 .net. I started a new project 2
    > > weeks ago. The application had no error, but now VS tells me:

    >
    > > <pre>Fehler 1 error C2143: syntax error : missing ';' before 'using' d:
    > > \Visual Studio 2005\Projects\thoughtbox\thoughtbox\thoughtbox.cpp 6
    > > </pre>

    >
    > > But I never modified anything in this file, and there is even no
    > > visible error. I don't want to start a new project, as told older
    > > posts. I even opened the source files in an external editor and saved
    > > them new.

    >
    > > Here is the code of thoughtbox.cpp:
    > > <pre>
    > > // thoughtbox.cpp : main project file.

    >
    > > #include "stdafx.h"
    > > #include "Form1.h"

    >
    > > using namespace thoughtbox;

    >
    > Well, I can try to suggest you to check the end of the file Form1.h...
    > could there be a missing semicolon or something like that?
    >
    > Regards,
    >
    > Zeppe


    @Ian: It's C++ .net.

    @Zeppe: It's the entire code posted above and there is surely no
    semikolon missing.

    :(
     
    Pol, Apr 23, 2007
    #4
  5. Pol

    Lionel B Guest

    On Mon, 23 Apr 2007 04:20:59 -0700, Pol wrote:

    > On Apr 23, 10:16 am, Zeppe
    > <> wrote:
    >> Pol wrote:
    >> > Hi,

    >>
    >> > Currently I'm using Visual Studio 2005 .net.


    [...]

    > @Ian: It's C++ .net.


    This ng deals with *standard* C++; you'll probably be more likely to find
    help in a .NET/C++ forum.



    --
    Lionel B
     
    Lionel B, Apr 23, 2007
    #5
  6. Pol

    Zeppe Guest

    Pol wrote:
    >
    > @Zeppe: It's the entire code posted above and there is surely no
    > semikolon missing.
    >
    > :(
    >


    Dear Pol,

    the code is not completely there. As I suggested you, you should check
    the file Form1.h

    If you forget a semicolon somewhere at the end of the file Form1.h, the
    error can appear while compiling the file thoughtbox.cpp.

    Post the file Form1.h and we can see what there is at the end, that's
    the only way to understand where the problem lays.

    Regards,

    Zeppe
     
    Zeppe, Apr 23, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. darkStar_e2

    _2694_ssce.msm corrupt..

    darkStar_e2, Oct 4, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    470
    Azhagan
    Oct 6, 2004
  2. Bjorn Jensen
    Replies:
    2
    Views:
    833
    Bjorn Jensen
    Mar 22, 2005
  3. Trevor Andrew
    Replies:
    2
    Views:
    522
    S. Justin Gengo
    Jul 24, 2003
  4. Jacky Kwok

    Re: Mail object and Corrupt PDF Files

    Jacky Kwok, Aug 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,893
    DataNumen
    Nov 18, 2006
  5. MSFT
    Replies:
    0
    Views:
    374
Loading...

Share This Page