u kojem smislu dali mozes nesto napraviti?
Ovo sam zasada napravio iz dosade, što mislite, jel mogu napraviti nešto s ovom osnovom?Code:#include <iostream> #include <cstdlib> #include <conio.h> #include <string> #include <stdio.h> #include <windows.h> using namespace std; int main(){ string input; string cmd1; cmd1 ="exit"; system("title DOS"); begin: printf ("Input: "); cin>>input; if (input == cmd1) { return 0; } else { cout<<endl; printf("UNKNOWH COMMDAND"); getch(); system("cls"); goto begin; } }
The User formerly known as Pyromancer.
u kojem smislu dali mozes nesto napraviti?
It's time to kick some ass...
Možeš napraviti novi CMD s nekim custom funkcijama.
Za početak se odluči hoćeš li koristiti printf ili cout
The candle flame gutters. Its little pool of light trembles. Darkness gathers. The demons begin to stir.
<3 <3 <3 <3 <3 <3 <3
ŠIRI SA MNOM LJUBAV Cherry!
Izvorno postao Luka
It's time to kick some ass...
@DragonSoul Odlična ideja! I'll do that.
@Luka cout mi je draži
The User formerly known as Pyromancer.
Imam problem, recimo u cin>>input; unesem echo Neki tekst. kako da napravim da se provjerava samo jedan dio inputa, ovaj echo dio?
The User formerly known as Pyromancer.
treba tebi getline(cin, input) di je input ime varijable...
obican cin poslije razmaka vise ne prima rijeci dok getline da...
a za ovo drugo ti treba rad sa stringovima
It's time to kick some ass...
Puno hvala!Izvorno postao fps_gamer
The User formerly known as Pyromancer.