| | |
| Stránka: 1 z 1
| [ Príspevkov: 5 ] | |
Autor | Správa |
---|
Registrovaný: 25.07.07 Prihlásený: 24.01.08 Príspevky: 11 Témy: 5 | Napísal arkan: 15.05.2008 10:50 | |
|
zdravim, mam otazku, ako spravim v programe Dev-C++ konzolu prikazoveho riadku? zatial mam tak toto, ale stale to vyhadzuje chyby , je to asi zle, viete mi niekto poradit ako sa to da spravit?
Kód: #include <iostream> #include <stdlib.h>
using std::cout; using std::cin;
int main() { char prikaz[255];
while (true) { cout << system("cmd"); cin.getline(prikaz, 255); system(cmd); } return 0; }
|
|
Registrovaný: 21.06.07 Prihlásený: 06.05.13 Príspevky: 421 Témy: 4 | Napísal sento: 15.05.2008 11:20 | |
|
Kód: #include <iostream> #include <stdlib.h> #include "stdafx.h"; // ja som to tu musel dat kvoli VS-C++
#include <iostream.h> // ja som to tu musel dat kvoli VS-C++ #include <process.h> // ja som to tu musel dat kvoli VS-C++
int main(int argc, char* argv[]) { char prikaz[255];
while (true) { cout << system("cmd"); cin.getline(prikaz, 255); system(prikaz); // <<< tuto bola chyba urcite } return 0; }
|
|
Registrovaný: 25.07.07 Prihlásený: 24.01.08 Príspevky: 11 Témy: 5 | Napísal autor témy arkan: 15.05.2008 11:45 | |
|
jj, vdaka no ale i tak to nejde
takze po uprave:
Kód: #include <iostream> #include <stdlib.h>
int main(int argc, char* argv[]) { char prikaz[255]; while (true) { cout << system("cmd"); cin.getline(prikaz, 255); system(prikaz); } return 0; }
problemy: Kód: iostream: No such file or directory. In function `main': `true' undeclared (first use in this function) (Each undeclared identifier is reported only once for each function it appears in.) `cout' undeclared (first use in this function) `cin' undeclared (first use in this function)
|
|
Registrovaný: 21.06.07 Prihlásený: 06.05.13 Príspevky: 421 Témy: 4 | Napísal sento: 15.05.2008 13:53 | |
|
#include <iostream.h>
.
.
.
while(1){...
|
|
Registrovaný: 25.07.07 Prihlásený: 24.01.08 Príspevky: 11 Témy: 5 | Napísal autor témy arkan: 15.05.2008 14:02 | |
|
vdakaaaa, uz to slape
|
|
| Stránka: 1 z 1
| [ Príspevkov: 5 ] | |
| Nemôžete zakladať nové témy v tomto fóre Nemôžete odpovedať na témy v tomto fóre Nemôžete upravovať svoje príspevky v tomto fóre Nemôžete mazať svoje príspevky v tomto fóre
|
|