Witam
Otóż mam pewien kod, który jest mi potrzebny, lecz przy kompilowaniu w visual c++ wyskakuje:
error C2447: '{' : missing function header (old-style formal list?)(line 9)
Szukam błędu od 20 minut i nie mogę znaleźć, pewnie dlatego, że nie znam wcale tego języka o.0 .
Byłbym bardzo wdzięczny, gdyby ktoś dał wskazówkę jak to rozwiązać.
Zamieszczam poniżej kod
namespace as {
using namespace System;
using namespace System::Collections::Generic;
using namespace System::ComponentModel;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Text;
using namespace System::Windows::Forms;
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Form1_FormClosing();
}
private void Form1_FormClosing()
{
const string message =
"There's an updated version of this program available. Would you like to download now?";
const string caption = "Please update";
var result = MessageBox.Show(message, caption,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
// If the no button was pressed ...
if (result == DialogResult.No)
{
MessageBox.Show("Program will close now. If you want to use this program please update to the newest version.", "Please update");
e.Cancel = false;
}
else if (result == DialogResult.Yes)
{
System.Diagnostics.Process.Start("http://www.google.com");
e.Cancel = false;
}
}
}
}