[C++] Euuhm, wat doe ik fout..

Pagina: 1
Acties:

  • mulder
  • Registratie: Augustus 2001
  • Laatst online: 23:21

mulder

ik spuug op het trottoir

Topicstarter
Ben noob op C++ gebied, en dit geeft foutmeldingen:
code:
1
2
3
4
5
void Position(int x, int y)
(
  gotoxy(x, y);
  cout << "*" << endl;
}

`x' was not declared in this scope
`y' was not declared in this scope
parse error before `;'
`Position' declared as function returning a function

Scheinn een liggie op mein...

oogjes open, snaveltjes dicht


  • whoami
  • Registratie: December 2000
  • Laatst online: 00:01
misschien
code:
1
2
void Positon(int x, int y)
{

ipv
code:
1
2
void Position (int x, int y)
(

https://fgheysels.github.io/


  • mulder
  • Registratie: Augustus 2001
  • Laatst online: 23:21

mulder

ik spuug op het trottoir

Topicstarter
Nope.
deze werkt wel:
code:
1
2
3
4
5
6
7
8
9
10
void gotoxy (int x, int y) 
{ 
     HANDLE hConsoleOutput; 
     COORD dwCursorPosition; 

     dwCursorPosition.X = x; 
     dwCursorPosition.Y = y; 
     hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE); 
     SetConsoleCursorPosition(hConsoleOutput,dwCursorPosition); 
}

Ben de basics juist aan het doorwerken en wat aan het kloten, maar als ik hier al strand....

oogjes open, snaveltjes dicht


  • Onno
  • Registratie: Juni 1999
  • Niet online
Op donderdag 29 november 2001 23:06 schreef El_Mundo het volgende:
Nope.
Ik denk dat je het verschil tussen beide stukjes niet helemaal hebt gezien. :)

Jij gebruikt een haakje openen, in plaats van een accolade.

  • mulder
  • Registratie: Augustus 2001
  • Laatst online: 23:21

mulder

ik spuug op het trottoir

Topicstarter
Fuuukkkkk, nou zie ik het. Jebus, misschien toch maar grotere monitor kopen (14"" nu, 6 jaar oud). Thx man.... bij mij lijkt ( op { ook in editor

oogjes open, snaveltjes dicht