Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Corrupt Project

Reply
Thread Tools

Corrupt Project

 
 
Pol
Guest
Posts: n/a
 
      04-23-2007
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(fal se);

// Create the main window and run it
Application::Run(gcnew Form1());
return 0;
}
</pre>

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      04-23-2007
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.
 
Reply With Quote
 
 
 
 
Zeppe
Guest
Posts: n/a
 
      04-23-2007
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
 
Reply With Quote
 
Pol
Guest
Posts: n/a
 
      04-23-2007
On Apr 23, 10:16 am, Zeppe
<(E-Mail Removed)> 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.



 
Reply With Quote
 
Lionel B
Guest
Posts: n/a
 
      04-23-2007
On Mon, 23 Apr 2007 04:20:59 -0700, Pol wrote:

> On Apr 23, 10:16 am, Zeppe
> <(E-Mail Removed)> 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
 
Reply With Quote
 
Zeppe
Guest
Posts: n/a
 
      04-23-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged. windows 2003 server Claude seraphin ASP .Net 12 02-15-2014 04:29 PM
Add C# web project to VB Web project Brad ASP .Net 2 04-01-2004 02:05 PM
Error while trying to run project: Unable to start debugging on the web server. The project is not configured Ken Stealth ASP .Net 2 01-31-2004 05:46 PM



Advertisments