May 18, 2014 at 12:04am UTC
The error has nothing to do with the line of code you provided.
Please provide to entire function.
May 18, 2014 at 12:18am UTC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
HEADER:
#ifndef BUTTON_H_INCLUDED
#define BUTTON_H_INCLUDED
void gotoxy(int x, int y);
int button(std::string text, int line);
#endif // BUTTON_H_INCLUDED
CPP:
#include <iostream>
#include <windows.h>
#include <Button.h>
void gotoxy(int x, int y){
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
int button(std::string text, int line, int result){
POINT Mouse;
int i = y *2;
int y = line * 13;
gotoxy(0, line);
std::cout << text << std::endl;
GetCursorPos(&Mouse);
cout << "Line * 13 : " << y << endl << "y * 2 : << i << Mouse.y
if ((GetKeyState(VK_LBUTTON) & 0x80) != 0){
if(Mouse.y <= i && Mouse.y >= y){
}
}
}
Last edited on May 18, 2014 at 12:19am UTC
May 18, 2014 at 12:12pm UTC
line 29 - you're missing a closing " for the block of text that starts here "y * 2 :