So I am writing a Windows Form App, and so when I run it it throws an error that it should not be throwing. It throws a “Syntax Error :Missing ; Before using”
I tried putting one on the previous line and it did not work.
The File In Question is this
// Rock Paper Scisors.cpp : main project file.
#include "stdafx.h"
#include "Form1.h"
using namespace RockPaperScisors;
[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;
}}
stdafx.h is part of MS Visual C++ Express, anyway, The code for Form1.h can be found at this pastebin (didn’t want to flood up the entire stack overflow page.) http://pastebin.com/324mpCps
All Help is Appreciated!
You just confused with the brackets.
Firstly, remove the last ‘}’ in Rock Paper Scisors.cpp file. Secodnly, this is how the correct Form1.h file should look:
I’ve only added one bracket near the end,closing the last method in class. Since Visual Studio 2010 and earlier don’t support the IntelliSense in C++/CLI, bugs are likely to occur in such projects.