Build fejl i c++ microsoft visual studio
Hej jeg er ret ny til c++ og når jeg prøver at builde min kode får jeg fejlene:1>------ Build started: Project: c++ learning, Configuration: Debug Win32 ------
1>Compiling...
1>Cool.cpp
1>c:\documents and settings\buhl\dokumenter\visual studio 2005\projects\c++ learning\c++ learning\cool.cpp(9) : warning C4390: ';' : empty controlled statement found; is this the intent?
1>c:\documents and settings\buhl\dokumenter\visual studio 2005\projects\c++ learning\c++ learning\cool.cpp(10) : error C2143: syntax error : missing ')' before ';'
1>c:\documents and settings\buhl\dokumenter\visual studio 2005\projects\c++ learning\c++ learning\cool.cpp(11) : error C2059: syntax error : ')'
1>c:\documents and settings\buhl\dokumenter\visual studio 2005\projects\c++ learning\c++ learning\cool.cpp(12) : error C2181: illegal else without matching if
1>c:\documents and settings\buhl\dokumenter\visual studio 2005\projects\c++ learning\c++ learning\cool.cpp(14) : error C2143: syntax error : missing ')' before ';'
1>c:\documents and settings\buhl\dokumenter\visual studio 2005\projects\c++ learning\c++ learning\cool.cpp(15) : error C2059: syntax error : ')'
1>Build log was saved at "file://c:\Documents and Settings\Buhl\Dokumenter\Visual Studio 2005\Projects\c++ learning\c++ learning\Debug\BuildLog.htm"
1>c++ learning - 5 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
koden er kort og simpel jeg kan ikke se hvad problemet er, ville være fedt hvis nogen kunne rette det
#include <iostream>
using namespace std;
int main()
{
int x = 3;
int y = 2;
if (x > y)
(
cout << "Hey x er større end " << y << endl;
)
else
(
cout << "Hey x er ikke større end " << y << endl;
)
}