Thread: [Dev-C++] (no subject) (Page 12)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Andre M. B. <ab...@cp...> - 2004-09-02 02:53:56
|
Dear Users, I=B4m having some (serious) difficulties to get a specific documentati= on and=20 a specific tool. Here they are: -A free "downloadable" e-book for developing windows device drivers for XP; -A free "downloadable" tool for develop a windows device driver for XP, like "DDK Suite 3" or "Windriver"; OR -A free "downloadable" e-book for developing windows device drivers for XP from zero (not being necessary the tool mentioned above); =20 Please guys, if you know, pass me the links or if you know "who knows" (another list), pass me too! I=B4ll thank you a lot!!! Regards Andre |
From: amaury p. <ama...@wa...> - 2004-09-02 07:36:57
|
Hello, I wanted you that Dev-Cpp is a great software I hope you will continue = to improve it . I also wanted to know one thing : how does Dev-Cpp transform the .rc = files into .res : is there any exe file avalaible for that from = microsoft or does Dev-Cpp parse and write the .res file alone ? |
From: Per W. <pw...@ia...> - 2004-09-02 08:00:33
|
Have a look at Makefile.win - or the compiler output tab when building a project - and you will see the command used for compiling the resource file. It is using the windres.exe program that is supplied with the compiler. /Per W On Thu, 2 Sep 2004, amaury pouly wrote: > Hello, > I wanted you that Dev-Cpp is a great software I hope you will continue to improve it . > I also wanted to know one thing : how does Dev-Cpp transform the .rc files into .res : is there any exe file avalaible for that from microsoft or does Dev-Cpp parse and write the .res file alone ? |
From: <lis...@ho...> - 2004-09-03 03:27:53
|
confirm 461041 _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn |
From: Meyer v. L. <von...@ho...> - 2004-09-11 15:02:04
|
hi please take a look at the source: #include <ctime> #include <iostream> using namespace std; int main() { char buffer[3]; int i,r,temp; int nums[50]; for(i = 1; i < 50; i++) { r = (rand() % 49) + 1; temp = nums[i]; nums[i] = nums[r] = temp; } cout << "Your six lucky numbers are...\n"; cout << itoa(nums[1], buffer, 10) << " "; cout << itoa(nums[2], buffer, 10) << " "; cout << itoa(nums[3], buffer, 10) << " "; cout << itoa(nums[4], buffer, 10) << " "; cout << itoa(nums[5], buffer, 10) << " "; cout << itoa(nums[6], buffer, 10) << " "; cout << endl; return 0; } i cant run without that win2k pro automaticly closes the apllication after i ran it - what kind of code should i inserted therefore i take a look first at the code before it closes it!? btw the prog shall creat 6 different 2-digit long numbers. thx a lot guys _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger |
From: Scott S. <age...@co...> - 2004-09-11 16:03:02
|
Three solutions: 1. Run your program from a console prompt 2. Include cstdlib and add the line system("APUSE); before return 0 3. Create a useless variable and add a cin statement for it before the return 0 --Scott Simontis-- Meyer von Landenhausen wrote: > hi please take a look at the source: > > #include <ctime> > #include <iostream> > using namespace std; > > int main() > { > char buffer[3]; > int i,r,temp; > int nums[50]; > > > for(i = 1; i < 50; i++) > { > r = (rand() % 49) + 1; > temp = nums[i]; nums[i] = nums[r] = temp; > } > > > cout << "Your six lucky numbers are...\n"; > cout << itoa(nums[1], buffer, 10) << " "; > cout << itoa(nums[2], buffer, 10) << " "; > cout << itoa(nums[3], buffer, 10) << " "; > cout << itoa(nums[4], buffer, 10) << " "; > cout << itoa(nums[5], buffer, 10) << " "; > cout << itoa(nums[6], buffer, 10) << " "; > cout << endl; > return 0; > } > > > i cant run without that win2k pro automaticly closes the apllication > after i ran it - what kind of code should i inserted therefore i take > a look first at the code before it closes it!? > > btw the prog shall creat 6 different 2-digit long numbers. > > thx a lot guys > > _________________________________________________________________ > It's fast, it's easy and it's free. Get MSN Messenger today! > http://www.msn.co.uk/messenger > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Per W. <pw...@ia...> - 2004-09-11 17:55:15
|
Modify rule 2 below to be system("PAUSE"); About the random generation. It is very, very wrong. 1) You say you need 6 random numbers, but you run your generation loop 49 times (1..49). 2) You never assign an random number anywyere... Your loop contains: temp = nums[i]; nums[i] = nums[r] = temp; In the first assignment, nums[i] hasn't been initialized yet, so temp will be set to an unknown value (which isn't the same as setting it to a random value). In the second assignment, you take temp (which has an undefined value) and assign to the i:th and the r:th element... I would assume that you were planning on filling the array with the values 1..49, and then perform 49 permutations to get the values 1..49 in random order, to make sure that the 6 values you print doesn't contain any repetition. for (i = 1; i < 50; i++) nums[i] = i; for (i = 1; i < 50; i++) { r = (rand() % 49) + 1; temp = nums[i]; nums[i] = nums[r]; nums[r] = temp; } One other thing. I think it is better to always use all elements of an array, i.e. use index 0..48 instead of creating the array one element larger and skip nums[0]. /Per W On Sat, 11 Sep 2004, Scott Simontis wrote: > Three solutions: > 1. Run your program from a console prompt > 2. Include cstdlib and add the line system("APUSE); before return 0 > 3. Create a useless variable and add a cin statement for it before the > return 0 > > --Scott Simontis-- > > > > Meyer von Landenhausen wrote: > > > hi please take a look at the source: > > > > #include <ctime> > > #include <iostream> > > using namespace std; > > > > int main() > > { > > char buffer[3]; > > int i,r,temp; > > int nums[50]; > > > > > > for(i = 1; i < 50; i++) > > { > > r = (rand() % 49) + 1; > > temp = nums[i]; nums[i] = nums[r] = temp; > > } > > > > > > cout << "Your six lucky numbers are...\n"; > > cout << itoa(nums[1], buffer, 10) << " "; > > cout << itoa(nums[2], buffer, 10) << " "; > > cout << itoa(nums[3], buffer, 10) << " "; > > cout << itoa(nums[4], buffer, 10) << " "; > > cout << itoa(nums[5], buffer, 10) << " "; > > cout << itoa(nums[6], buffer, 10) << " "; > > cout << endl; > > return 0; > > } > > > > > > i cant run without that win2k pro automaticly closes the apllication > > after i ran it - what kind of code should i inserted therefore i take > > a look first at the code before it closes it!? > > > > btw the prog shall creat 6 different 2-digit long numbers. > > > > thx a lot guys > > > > _________________________________________________________________ > > It's fast, it's easy and it's free. Get MSN Messenger today! > > http://www.msn.co.uk/messenger > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > Project Admins to receive an Apple iPod Mini FREE for your judgement on > > who ports your project to Linux PPC the best. Sponsored by IBM. > > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Rodrigo E. H <kh...@mi...> - 2004-09-27 01:01:13
|
confirm 145061 |
From: Eric <eri...@cl...> - 2004-09-27 18:53:00
|
what's this "confirm 145061" bit? Chaos is found in greatest abundance wherever order is being sought. It always defeats order, because it is better organized ----- Original Message ----- From: "Rodrigo Erazo H" <kh...@mi...> To: <dev...@li...> Sent: Monday, September 27, 2004 1:03 PM Subject: [Dev-C++] (no subject) confirm 145061 ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.769 / Virus Database: 516 - Release Date: 24-Sep-04 |
From: Per W. <pw...@ia...> - 2004-09-27 21:00:20
|
People who are registering to the list and isn't so good at reading the automated mail response they receive, where it clearly says what mail address they should send the confirm message to. /Per W On Tue, 28 Sep 2004, Eric wrote: > what's this "confirm 145061" bit? |
From: Ivan I S <zi...@ya...> - 2004-10-28 13:25:33
|
confirm 677131 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: augustowebd <aug...@gm...> - 2004-11-17 19:13:45
|
--=20 A diferen=E7a entre os homens comuns e os guerreiros =E9 que os guerreiros encaram tudo como um desafio, enquanto os homens comuns encaram tudo como uma ben=E7=E3o ou uma maldi=E7=E3o. |
From: Alf C S. <al...@st...> - 2004-11-18 06:42:45
|
I have developed a program on Linux and carried the source to Windows and while attempting to compile get an error message saying that one cannot use the -o with -c options. I am sure that this was covered previously but I cannot find it. --- Regards, Alf Stockton www.stockton.co.za Lie, n.: A very poor substitute for the truth, but the only one discovered to date. |
From: <kre...@go...> - 2005-01-02 16:38:14
|
Hi!=0D I`m wondering why function (converting constructor declared in my =0D class like this "Date int()" and then called like this "Date::=0D Date(int dni=3D0) {...}", sorry I don't know english terminology) is =0D considered by Project Manager as global instead of class Date =0D member? :)=0D I think it is a bug:)=0D =0D -- =0D Best regards,=0D Maciej Nadolski=0D kre...@go... |
From: Andre M. B. <ab...@cp...> - 2005-01-04 16:08:39
|
Dear Users, I am trying to compile a Windows .C project with the three files: the .c source-code, the .rc resource file=20 and the .h resource.h file. I still getting the compile error message in the resource file. Two sets of recommendations I=B4ve already receive. The two sets I=B4ve already implemented. The previous e-mail already showed the results of the 1st set of recommendations (->to update Dev without effect, ->#include <windows.h> inside the .rc file with good effect to some cases, ->to begin with an empty project, instead of a windows project without effect). Here are the results of the the 2nd. set of=20 recommendations: 1-To update the binutils packet from mingw to get the newest windres.exe: I made the download (current packet option) and installed FULL binutils packet over my c:\dev-cpp folder (on the respective places, ok?), but the version of the=20 windres.exe file was the same, that is, 2.15.91, and the compile error on resource file message was the same. 2-To add c:\dev-cpp\bin folder on the PATH variable: I put on the AUTOEXEC.BAT, boot the computer and the compile error message on the resource file "fowarded" to some lines bellow, stopping specifically=20 indicating a "unkown" IDC_STATIC constant. Looking for this constant, I found it in winuser.h (that is automatically called via windows.h). I "forced" a #define IDC_STATIC -1 in the resource.h, but the compile error message "forwarded" again and stopped in another place :-((( Please be patient... Any other ideas? Regards Andre Barros If it is interesting to anyone, here are the=20 codes: *************** about1.c *************************************** /*------------------------------------------ ABOUT1.C -- About Box Demo Program No. 1 (c) Charles Petzold, 1998 ------------------------------------------*/ #include <windows.h> #include "resource.h" LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; BOOL CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM) ; int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { static TCHAR szAppName[] =3D TEXT ("About1") ; MSG msg ; HWND hwnd ; WNDCLASS wndclass ; =20 wndclass.style =3D CS_HREDRAW | CS_VREDRAW ; wndclass.lpfnWndProc =3D WndProc ; wndclass.cbClsExtra =3D 0 ; wndclass.cbWndExtra =3D 0 ; wndclass.hInstance =3D hInstance ; wndclass.hIcon =3D LoadIcon (hInstance, szAppName) ; wndclass.hCursor =3D LoadCursor (NULL, IDC_ARROW) ; wndclass.hbrBackground =3D (HBRUSH) GetStockObject (WHITE_BRUSH) ; wndclass.lpszMenuName =3D szAppName ; wndclass.lpszClassName =3D szAppName ; =20 if (!RegisterClass (&wndclass)) { MessageBox (NULL, TEXT ("This program requires Windows NT!"), szAppName, MB_ICONERROR) ; return 0 ; } =20 hwnd =3D CreateWindow (szAppName, TEXT ("About Box Demo Program"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL) ; =20 ShowWindow (hwnd, iCmdShow) ; UpdateWindow (hwnd) ;=20 =20 while (GetMessage (&msg, NULL, 0, 0)) { TranslateMessage (&msg) ; DispatchMessage (&msg) ; } return msg.wParam ; } LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM=20 lParam) { static HINSTANCE hInstance ; =20 switch (message) { case WM_CREATE : hInstance =3D ((LPCREATESTRUCT) lParam)->hInstance ; return 0 ; =20 case WM_COMMAND : switch (LOWORD (wParam)) { case IDM_APP_ABOUT : DialogBox (hInstance, TEXT ("AboutBox"), hwnd, AboutDlgPro= c) ; break ; } return 0 ; =20 case WM_DESTROY : PostQuitMessage (0) ; return 0 ; } return DefWindowProc (hwnd, message, wParam, lParam) ; } BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message,=20 WPARAM wParam, LPARAM lParam) { switch (message) { case WM_INITDIALOG : return TRUE ; =20 case WM_COMMAND : switch (LOWORD (wParam)) { case IDOK : case IDCANCEL : EndDialog (hDlg, 0) ; return TRUE ; } break ; } return FALSE ; } *************************************************************** ************ about1.rc ************************************ #include <windows.h> #include "resource.h" ABOUTBOX DIALOG DISCARDABLE 32, 32, 180, 102 STYLE DS_MODALFRAME | WS_POPUP FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,66,81,50,14 /* ICON "ABOUT1",IDC_STATIC,7,7,21,20 */ ICON "ABOUT1",-1,7,7,21,20 CTEXT "About1",IDC_STATIC,40,12,100,8 CTEXT "About Box Demo Program",IDC_STATIC,7,40,166,8 CTEXT "(c) Charles Petzold, 1998",IDC_STATIC,7,52,166,8 END ABOUT1 MENU DISCARDABLE =20 BEGIN=20 POPUP "&Help" BEGIN MENUITEM "&About About1...", IDM_APP_ABOUT END END ABOUT1 ICON DISCARDABLE "about1.ico" GUIDELINES DESIGNINFO DISCARDABLE=20 BEGIN "ABOUTBOX", DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 173 TOPMARGIN, 7 BOTTOMMARGIN, 95 END END *************************************************************** ************** resource.h ******************************* #include <windows.h> #define IDM_APP_ABOUT 40001 ********************************************************* ****************** makefile.win ****************** # Project: p-about1 # Makefile created by Dev-C++ 4.9.9.1 CPP =3D g++.exe CC =3D gcc.exe WINDRES =3D windres.exe RES =3D p-about1_private.res OBJ =3D about1.o $(RES) LINKOBJ =3D about1.o $(RES) LIBS =3D -L"C:/Dev-Cpp/lib" -mwindows =20 INCS =3D -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/include"=20 CXXINCS =3D -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw3= 2" - I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -I"C:/Dev- Cpp/include"=20 BIN =3D p-about1.exe CXXFLAGS =3D $(CXXINCS) =20 CFLAGS =3D $(INCS) =20 .PHONY: all all-before all-after clean clean-custom all: all-before p-about1.exe all-after clean: clean-custom rm -f $(OBJ) $(BIN) $(BIN): $(OBJ) $(CC) $(LINKOBJ) -o "p-about1.exe" $(LIBS) about1.o: about1.c $(CC) -c about1.c -o about1.o $(CFLAGS) p-about1_private.res: p-about1_private.rc about1.rc=20 $(WINDRES) -i p-about1_private.rc --input-format=3Drc -o p- about1_private.res -O coff=20 ****************************************************** |
From: Gerson L. <ja...@ya...> - 2005-01-05 17:00:24
|
Estimado Andre: Now that you show the code, I noticed I'm not actualized about resource files, but i can tell you this: 1) Since I use an old version of Dev (dev 4.0 and 4.01) i don know about makefiles, i don't use them, i just click the compile or the compile an run icon in my toolbar. May be there is the error, may be ther is a litle thing in that file. It looks fine to me but... 2) I never use IDC_STATIC, I put the plain ' -1 ' in there, because if I'm not wrong, that number is only used to identify the controls whithin a window or dialog box and be able to proccess the messages from 'em and send/post messages to them, so, if I dont want to process messages o send msg, ... 3) Here is an example of MY USAGE of the resource file, i've learned this an modifiing conform to my programming needs. I dont know pretty much about the sintax youre using, but i see it requires less typing ;) #include <windows.h> #include "IDs.h" TomaDatos DIALOG 0,0,270, 140 STYLE WS_VISIBLE | WS_POPUP | WS_CAPTION | DS_MODALFRAME CAPTION "Toma de Datos" FONT 8,"Courier" BEGIN CONTROL "Campos", -1, "BUTTON", WS_CHILD | WS_VISIBLE | BS_GROUPBOX, 5, 10, 205, 128 CONTROL "Aceptar", IDOK , "BUTTON", WS_CHILD | WS_VISIBLE , 215, 15, 50, 15 CONTROL "Cancelar", IDCANCEL, "BUTTON", WS_CHILD | WS_VISIBLE , 215, 35, 50, 15 END the IDs.h file is almost the same thing as your resource.h. If I do the same dialog box as you, I'll probably do something like this: ABOUTBOX DIALOG DISCARDABLE 32, 32, 180, 102 STYLE DS_MODALFRAME | WS_POPUP FONT 8, "MS Sans Serif" BEGIN CONTROL "OK",IDOK, "BUTTON", WS_CHILD | WS_VISIBLE, 66,81,50,14 /* ICON "ABOUT1", -1,7,7,21,20 // I won't touch this , i don't know about it */ ICON "ABOUT1",-1,7,7,21,20 // I won't touch this , i don't know about it CONTROL "About1", -1, "STATIC", WS_CHILD | WS_VISIBLE, 40,12,100,8 CONTROL "About Box Demo Program",-1, "STATIC" , WS_CHILD | WS_VISIBLE ,7,40,166,8 CONTROL "(c) Charles Petzold, 1998",-1, "STATIC" , WS_CHILD | WS_VISIBLE ,7,52,166,8 END It should be the same thing, exept than as I use the word "CONTROL" it is necesary to tell what kind of control you want, using EDIT, STATIC, LISTBOX, COMBOBOX, and so on... and it is necesary to explicitly choose the styles : WS_CHILD, WS_BORDER... things like that ... these are automatically set when you use CTEXT, DEFPUSHBUTTON and so on. Make the try and tell me what happens... I hope this to be useful PD: Excuse me if my english is not too good, my natural language is the spanish español, castellano, Hondureño :) Andre Macario Barros <ab...@cp...> wrote: ************ about1.rc ************************************ #include #include "resource.h" ABOUTBOX DIALOG DISCARDABLE 32, 32, 180, 102 STYLE DS_MODALFRAME | WS_POPUP FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,66,81,50,14 /* ICON "ABOUT1",IDC_STATIC,7,7,21,20 */ ICON "ABOUT1",-1,7,7,21,20 CTEXT "About1",IDC_STATIC,40,12,100,8 CTEXT "About Box Demo Program",IDC_STATIC,7,40,166,8 CTEXT "(c) Charles Petzold, 1998",IDC_STATIC,7,52,166,8 END ABOUT1 MENU DISCARDABLE BEGIN POPUP "&Help" BEGIN MENUITEM "&About About1...", IDM_APP_ABOUT END END ABOUT1 ICON DISCARDABLE "about1.ico" GUIDELINES DESIGNINFO DISCARDABLE BEGIN "ABOUTBOX", DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 173 TOPMARGIN, 7 BOTTOMMARGIN, 95 END END *************************************************************** ************** resource.h ******************************* #include #define IDM_APP_ABOUT 40001 ********************************************************* --------------------------------- |
From: Austin S. <Aus...@co...> - 2005-02-23 23:04:39
|
Hi,=20 I'm just getting started with Dev-C++ and I just need a simple question = answered. how do you make and .exe file? , it compiles and all that, I = just cant get it to make a .exe file, like one I could send to my = friend. if you could tell me how I would be most grateful. Thank you. |
From: jack c. <jac...@ya...> - 2005-02-26 21:51:43
|
--------------------------------- Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. |
From: Koos <koo...@po...> - 2005-03-07 14:58:34
|
Hi, My program has a problem, when I compile and run even the simplest of programs, the text window doesn't stay open. I have ticked the option in the tools menu but it makes no difference. I have also tried running the latest ver. of Dev. I'm running win xp prof. with sp2. Any help would be greatly appreciated. Thanks Koos ________________________________________________________________ Sent via the WebMail system at postnet.co.za This mail service is supplied free of charge to our customers and the content of this e-mail does not represent the opinion of the supplier of the service. |
From: Marek J. <sp...@we...> - 2005-03-07 15:01:36
|
Koos wrote: > Hi, > > My program has a problem, when I compile and run even the simplest of programs, the text window doesn't stay open. I have ticked the option in the tools menu but it makes no difference. I have also tried running the latest ver. of Dev. > I'm running win xp prof. with sp2. > Any help would be greatly appreciated. http://aditsu.freeunixhost.com/dev-cpp-faq.html#pause -- Marek |
From: Per W. <pw...@ia...> - 2005-03-07 15:02:21
|
Have you tested to read the FAQ? How about testing system("pause"); at the end of the application, or reading some input or similar? /Per W On Mon, 7 Mar 2005, Koos wrote: > Hi, > > My program has a problem, when I compile and run even the simplest of programs, the text window doesn't stay open. I have ticked the option in the tools menu but it makes no difference. I have also tried running the latest ver. of Dev. > I'm running win xp prof. with sp2. > Any help would be greatly appreciated. > Thanks > Koos |
From: Eric <eri...@cl...> - 2005-03-07 17:18:57
|
it is just so simple to add a subject line ----- Original Message ----- From: "Koos" <koo...@po...> To: <dev...@li...> Sent: Tuesday, March 08, 2005 3:53 AM Subject: [Dev-C++] (no subject) Hi, My program has a problem, when I compile and run even the simplest of programs, the text window doesn't stay open. I have ticked the option in the tools menu but it makes no difference. I have also tried running the latest ver. of Dev. I'm running win xp prof. with sp2. Any help would be greatly appreciated. Thanks Koos |
From: Per W. <pw...@ia...> - 2005-03-07 18:12:54
|
The "new post" window probably didn't stay open long enough to write the subject line ;) /Per W On Tue, 8 Mar 2005, Eric wrote: > it is just so simple to add a subject line > > ----- Original Message ----- > From: "Koos" <koo...@po...> > To: <dev...@li...> > Sent: Tuesday, March 08, 2005 3:53 AM > Subject: [Dev-C++] (no subject) > > > Hi, > > My program has a problem, when I compile and run even the simplest of programs, the text window doesn't > stay open. I have ticked the option in the tools menu but it makes no difference. I have also tried > running the latest ver. of Dev. > I'm running win xp prof. with sp2. > Any help would be greatly appreciated. > Thanks > Koos > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Austin S. <Aus...@co...> - 2005-04-13 04:19:31
|
Hi. I'm new to programming, and don't know all the terminology, so = please go easy on me. I'm trying to figure out how to create a include file so I can use it's = functions in my programs, by just including it. Here's my simple test program that didn't work in the least ^^=20 __________________________________________________ the program I tried to link to: #include<iostream> using namespace std; int subten(int num) { num -=3D 10; return num; } The program I tried to link to the above with: #include <iostream> #include "subten" using namespace std; main() { int a =3D 20; cout << a << endl;=20 a=3Dsubten(a); cout << a; system("pause"); } Ok, now please don't chew me out to bad for the mistakes that I made, = and are common knowledge to everyone but me :p. thanks. |
From: Per W. <pw...@ia...> - 2005-04-13 06:19:51
|
Don't put code in include files. Just put declarations there and code in *.cpp files. So: subten.h: int subten(int num); subten.cpp: #include "subten.h" int subten(int num) { return num - 10; } main.cpp: #include <iostream> #include "subten.h" int main() { ... a = subten(a); ... } Then add the new source file subten.cpp to your project, to make sure that it gets compiled and linked into the application. Note also, avoid "using namespace std" and instead just "wake up" the individual items you need. And most importantly: don't do a big global "using namespace std" in a header file. Note that the scope of the using statement isn't limited to the include file but will "taint" the source file that references the include file too. Short note about include files. They are treated just as if all text in them had been available in the *.cpp file. That is why they are called include files :) /Per W On Wed, 13 Apr 2005, Austin Scholze wrote: > Hi. I'm new to programming, and don't know all the terminology, so please go easy on me. > > I'm trying to figure out how to create a include file so I can use it's functions in my programs, by just including it. > > Here's my simple test program that didn't work in the least ^^ > > __________________________________________________ > > the program I tried to link to: > > #include<iostream> > > using namespace std; > > > int subten(int num) > { > num -= 10; > return num; > } > > The program I tried to link to the above with: > > #include <iostream> > #include "subten" > using namespace std; > > main() > { > > int a = 20; > cout << a << endl; > a=subten(a); > cout << a; > > system("pause"); > } > > Ok, now please don't chew me out to bad for the mistakes that I made, and are common knowledge to everyone but me :p. thanks. > |