gggggogi Posted September 7, 2004 Share Posted September 7, 2004 Zashto kogato kompiliram edin nai obiknoven kod primerno: #include <stdio.h> int main(void) { char ch; float f; double d; ch = 'x'; f = 100.123; d = 123.009; printf("ch is %c, ", ch); printf("f is %f, ", f); printf("d is %f", d); return 0; } I kato startiram kompiliraniq fail mi go otvarq i zatvarq avtomatichno za nqkolko secundi? Link to comment Share on other sites More sharing options...
Veli Posted September 7, 2004 Share Posted September 7, 2004 Startirai go prez cmd i nqma da ti go zatvori Link to comment Share on other sites More sharing options...
gggggogi Posted September 7, 2004 Author Share Posted September 7, 2004 A kakvo e tova CMD che az sum nachinaesht? Link to comment Share on other sites More sharing options...
lexx Posted September 7, 2004 Share Posted September 7, 2004 Za6toto q startira6 pod windows i kogato izpalnenieto na programata zavar6i t.e nqkolko secundi te vra6ta obratno v win kato iztriva konzolniq prozorec.Za da ne stava taka ili startirai programkata ot dos prompta ili q promeni kakto sledva: #include <stdio.h> #inclide <stdlib.h> int main(void) { char ch; float f; double d; ch = 'x'; f = 100.123; d = 123.009; printf("ch is %c, ", ch); printf("f is %f, ", f); printf("d is %f", d); system("pause"); return 0; } sas system("pause") sled izpalnenieto se 4aka za natiskaneto na nqkav buton i prozoreca nqma da se iztrie dokano ne natisne6 ne6to Link to comment Share on other sites More sharing options...
gggggogi Posted September 7, 2004 Author Share Posted September 7, 2004 a tova zashto ne stava taka? #include <stdio.h> int main(void) { printf("This is a short C program"); return 0; system("pause"); } Link to comment Share on other sites More sharing options...
golqmhaker Posted September 7, 2004 Share Posted September 7, 2004 A kakvo e tova CMD che az sum nachinaesht? <{POST_SNAPBACK}> Това отваря една програмка като dos, обаче e cmd. Значи ще ти дам пример. Ако напишеш net send име на компютър(ако си в мрежа с някой) и след името пишеш съобщението, на екрана ще излезе това Извинявай за качеството, ама нещо не е както трябва. Link to comment Share on other sites More sharing options...
ov3rm4n Posted September 7, 2004 Share Posted September 7, 2004 Като за начинаещ - компилирай това и си свиркай: #include <stdbeer.h> #include <sys/cheese.h>//sirjenje #include <kernel/pk.h> //PurzhenI KartoffI.H34D3r #include <stdio.h> //needz some std I/O for openin' da kasa s bira. #include "HyperDrink.h" #define STDKASALENGTH 24 int main(int rgDz, char ** SdfG){ FILE *dB; int dX=0; while(SdfG[dX]) { if(dB=fopen(SdfG[dX],"df+")) { //successful f0p3n na n-Ta kasa s drink fast propertiez HyperDrink *hPd = new HyperDrink(dB); int cnt=0;//schetovodna promenliva do{ hPd->drink(cnt++); hPd->mezzIBreKume(void); if(!(cnt%4)) { hPd->WeeWee(0x00) ;} } while (cnt<=STDKASALENGTH); sleep(3*60);//malko 3 minz (eat CPU) lafche mejdu kasetkite } if((++dX)>=rgDz){fprintf(stderr,"\r\n\t\tBasa_Maamu_SfurshiaAKasetkiTe!!!\r\n"); exit(0); break;/*forcible bail-out*/} hPd->~HyperDrink();//DatzMaWaY! fclose(dB); } return((int)(0x14def)); } Извадката е взета от Форума на WebDevMagazine... Повече разработки по темата има на този линк. Инджой! Link to comment Share on other sites More sharing options...
lexx Posted September 7, 2004 Share Posted September 7, 2004 6toto system("pause") iska stdlib.h da e vklu4en. #include <stdio.h> #include <stdlib.h> int main(void) { printf("This is a short C program"); system("pause"); return 0; } Link to comment Share on other sites More sharing options...
Jorkis Posted September 7, 2004 Share Posted September 7, 2004 Да обаче той както тръгва да пише return 0; преди да е написал system("pause"); каквото и да включи горе, няма да стане, така че ggggggggggggogi (извинявай за g-тата, ама да беше написал още толкова, ако искаш да се занимаваш сериозно, бих те посъветвал да си купиш някоя хубава книжка за C Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.