dvdbrander
Gebruiker
- Lid geworden
- 13 apr 2010
- Berichten
- 34
oke, ik ben idd nieuw in c++ en ik gebruik nu:
[CPP]#include <stdafx.h>
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <string>
using namespace std;
//code
//in de main:
if (kbhit()) {
key = getch();
if (key == 0) // get extended keycode
key = getch();
command=;//hier gaat t om!!!
if (key == 13){
command="";
}
if (key == 27) return;
[/CPP]
daar waar //hier gaat het om!!! achter staat draait t om.
iig, ik wil dus dat de toets die is ingedrukt word toegevoegd aan command
hoe doe ik dat?
ik hat zelf dit bedacht:
command.char(key), maar dat bleek voor geen meter te werken...
hoe moet t wel?
[CPP]#include <stdafx.h>
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <string>
using namespace std;
//code
//in de main:
if (kbhit()) {
key = getch();
if (key == 0) // get extended keycode
key = getch();
command=;//hier gaat t om!!!
if (key == 13){
command="";
}
if (key == 27) return;
[/CPP]
daar waar //hier gaat het om!!! achter staat draait t om.

iig, ik wil dus dat de toets die is ingedrukt word toegevoegd aan command
hoe doe ik dat?
ik hat zelf dit bedacht:
command.char(key), maar dat bleek voor geen meter te werken...

hoe moet t wel?