Geplaatst: 16 juni 200717 jaren comment_707489 Hallo, Ik ben op dit moment met c++ aan het coden (in VB6 c++) Maar hoe kan ik bijv. een commando maken, als iemand intikt "/ikbencool" dan het bericht krijgt "Leuk voor je". Ik dacht: double /ikbencool = 0.0; cin >> /ikbencool; if /ikbencool then { cout << "Leuk voor je!"<<endl; } else { cout << " "<<endl; } Maar dat werkt niet.. Kan iemand mij helpen? Greetz, Tim
Geplaatst: 16 juni 200717 jaren comment_707514 Ik weet niet hoe het met VB6 C++ zit (ken ik trouwens niet). Maar in gewoon C++ gaat het zo: include <iostream> include <string> using namespace std; int main() { string Istring; string check = "/ikbencool"; cin >> Istring; if (Istring == check) { cout << text << endl; } else { // } cin.get(); cin.get(); return 0; } Niet getest op evt fouten. Bewerkt: 16 juni 200717 jaren door Mania-92
Geplaatst: 16 juni 200717 jaren Auteur comment_707520 Ik weet niet hoe het met VB6 C++ zit (ken ik trouwens niet). Maar in gewoon C++ gaat het zo: include <iostream> include <string> using namespace std; int main() { string Istring; string check = "/ikbencool"; cin >> Istring; if (Istring == check) { cout << text << endl; } else { // } cin.get(); cin.get(); return 0; } Niet getest op evt fouten. VB6 c++ is gwn c++ alleen het progje heet zo
Hallo,
Ik ben op dit moment met c++ aan het coden (in VB6 c++)
Maar hoe kan ik bijv. een commando maken, als iemand intikt "/ikbencool" dan het bericht krijgt "Leuk voor je".
Ik dacht:
double /ikbencool = 0.0;
cin >> /ikbencool;
if /ikbencool then
{
cout << "Leuk voor je!"<<endl;
} else {
cout << " "<<endl;
}
Maar dat werkt niet..
Kan iemand mij helpen?
Greetz,
Tim