Corrupt Project

P

Pol

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>
 
I

Ian Collins

Pol said:
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.
 
Z

Zeppe

Pol said:
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
 
P

Pol

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.

:(
 
Z

Zeppe

Pol said:
@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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top