dev-cpp-users Mailing List for Dev-C++ (Page 755)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: A. Jans-B. <jan...@wx...> - 2000-11-22 21:35:46
|
I am using DevC++ 4 for a new project, and want to use the library "Allegro". This library contains a make-file for stand-alone mingw-compiler. I would like to know however how I can use the compiler that comes with DevC++. What settings for the environment do I need (the path to DevC++ is "c:\devc++"). |
From: loll <cp...@th...> - 2000-11-22 21:20:13
|
Hi, I recently downloaded dev c++ and I am trying to clear the dos window im writing to. The command clrscr(); I thought should work. I added conio.h to the include files but when i compile with that command in it I get an error in the linker "undefined reference to clrscr();" Can anyone tell me what im doing wrong here? Thanks Lawrence |
From: SpiderMan <Spi...@pr...> - 2000-11-22 18:59:43
|
You can get the full documentation about pretty much all of WinAPI = at http://msdn.microsoft.com=20 ----- Original Message -----=20 From: Mundt, Sebastian=20 To: 'dev...@li...'=20 Sent: Wednesday, November 22, 2000 12:47 AM Subject: [Dev-C++] windows.h reference Hi =20 I'm new to this list, so condone me if this question has already been answered. =20 Is there some kind of reference to the windows.h header and where can = I find it (URLs prefered).=20 =20 Thank y'all for your help! =20 =20 -- Sebastian Mundt mailto:sebastian <mailto:seb...@mu...@gesis.de> @mundt.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users -------------------------------------------------------------------------= ----- Link is external to the Privacyx.com System |
From: Ian W. <lak...@ho...> - 2000-11-22 17:52:56
|
hi all, i was just hoping that somone knows a) how to make tones on the pc's internal speaker, & b) How to create flashing text in a console. if anyone knows how to do this it would be much apreaciated if you could tell me the c++ code. thanks alot, Ian. _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com |
From: <bis...@bt...> - 2000-11-22 09:34:59
|
Great news !! I think Dev C++ is the best free IDE currently available on Windows. Some suggestions (in no particular order): a) Currently you cannot use relative path when adding icons, etc. to the resource file - the directory where the project file is kept should behave as the current directory. This will save us from a lot of pain. b) The resource loader button (from project options) leaves a leading blank space. c) The code snippet feature is pretty nice but it would be better to have something like LCC WEdit where you can write full -fledged routines which you can insert at any point of your program. Currently the wixard only works when you start a project. d) Inbuilt support for WxWindows will be very nice - esp. since you're planning to make Dev C++ cross-platform. e) A class browser !! There are quite a few free (GPL/LGPL) C++ parsers/class browsers already available - how difficult would it be to integrate one ? f) Any chance of getting a version of Dev C++ written in C++ + WxWindows ? I would love to contribute but I don't have Delphi :-) g) Last but not the least, better and more flexible project wizards (I love LCC-Win32's project wizard - too bad it is Win API only :-() would be very nice. Ideally, one should be able to design one's own wizard which will interact with the user to build the initial framework. Keep up the good work! - Biswa. > -----Original Message----- > From: Colin Laplace [mailto:web...@bl...] > Sent: 21 November 2000 23:24 > To: dev...@li... > Subject: [Dev-C++] Dev-C++ updates development start again ;) > > > Hello ! > > This is just to say that i'm working again on making Dev-C++ > updates. Version > 4.01 should be available soon, and other updates may follow too. In > January-February, Dev-C++ will be rewritten to work on both > Linux and Windows > operating systems. > > Greetings ! > Colin Laplace > web...@bl... > http://www.bloodshed.net > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: <bis...@bt...> - 2000-11-22 09:22:10
|
I had the same problem - do the following: a) Go to project -> Project Options. remove the resource file name from the second last (from the bottom) text box and click on 'Load Resource..' to load your own resource. There is a bug because of which there is a leading space before the name of the resource file - remove that space. b) All icons, etc. must be specified with the full path because apparantly Dev C++ does not take the project directory to be the current directory - very annoying but that's the only solution I've found. Works like a charm if you follow the above :-) - Biswa. > -----Original Message----- > From: Richard P. Evans [mailto:ev...@ma...] > Sent: 21 November 2000 16:31 > To: dev...@li... > Subject: [Dev-C++] Problem with resource files. > > > I'm having some problems with resource files when I start a > project. Everytime I start a new project Dev-C++ > automatically creates > "Rsrc.rc" in the project and it compiles. If I have a > resource file that I > have added to the project list it ignores it or if I add it > to a makefile > it compiles it but doesn't link. I have tried removing > "Rsrc.rc" from the > project but then it refused to compile because, as it says, > that file is > missing. I have tried copying my resource file to "Rsrc.rc" > which does > then compile but if I am calling for anything, such as > "xyz.ico", which is > in the same directory, the compiler can't find it. What am I doing > wrong? I can't be adding a path to the working directory so > it can find > it. Then it wouldn't be portable. Some one help me through > the proper use > of Dev-C++ when I am starting a project with multiple files > - *.cpp, *.h, > *.rh, and *.rc. Thanks. > > Richard P. Evans > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: Mundt, S. <seb...@ge...> - 2000-11-22 08:47:04
|
Hi I'm new to this list, so condone me if this question has already been answered. Is there some kind of reference to the windows.h header and where can I find it (URLs prefered). Thank y'all for your help! -- Sebastian Mundt mailto:sebastian <mailto:seb...@mu...@gesis.de> @mundt.com |
From: Matthew F. <fit...@ho...> - 2000-11-22 01:30:10
|
So glad to hear it!! Love your IDE!! Please keep it up!! ----- Original Message ----- From: Colin Laplace <web...@bl...> To: <dev...@li...> Sent: Tuesday, November 21, 2000 3:24 PM Subject: [Dev-C++] Dev-C++ updates development start again ;) > Hello ! > > This is just to say that i'm working again on making Dev-C++ updates. Version > 4.01 should be available soon, and other updates may follow too. In > January-February, Dev-C++ will be rewritten to work on both Linux and Windows > operating systems. > > Greetings ! > Colin Laplace > web...@bl... > http://www.bloodshed.net > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: Colin L. <web...@bl...> - 2000-11-21 23:34:23
|
Hello ! This is just to say that i'm working again on making Dev-C++ updates. Version 4.01 should be available soon, and other updates may follow too. In January-February, Dev-C++ will be rewritten to work on both Linux and Windows operating systems. Greetings ! Colin Laplace web...@bl... http://www.bloodshed.net |
From: <jor...@wa...> - 2000-11-21 17:16:26
|
Hi, i=B4m a newbie: Does anybody know where can i find an complete reference of the C = include and funtion libraries? Free of charge if its posible. jorge |
From: Richard P. E. <ev...@ma...> - 2000-11-21 16:30:41
|
I'm having some problems with resource files when I start a project. Everytime I start a new project Dev-C++ automatically creates "Rsrc.rc" in the project and it compiles. If I have a resource file that I have added to the project list it ignores it or if I add it to a makefile it compiles it but doesn't link. I have tried removing "Rsrc.rc" from the project but then it refused to compile because, as it says, that file is missing. I have tried copying my resource file to "Rsrc.rc" which does then compile but if I am calling for anything, such as "xyz.ico", which is in the same directory, the compiler can't find it. What am I doing wrong? I can't be adding a path to the working directory so it can find it. Then it wouldn't be portable. Some one help me through the proper use of Dev-C++ when I am starting a project with multiple files - *.cpp, *.h, *.rh, and *.rc. Thanks. Richard P. Evans |
From: <bis...@bt...> - 2000-11-21 11:11:02
|
Yes, I'm having this problem too. Worse, it cannot have a resource name the same as a CPP source file name either. It seems that the resource compiler windres will generate xx.o from xx.cpp as well as xx.rc as per the Makefile. Also, the project target will be xx.exe for a project called xx. Perhaps if we change the Makefile generation technique to something like : windres -o {RESOURCE_NAME}_rc.o {RESOURCE_NAME}.rc This will solve a lot of problems. BTW, currently, this means that I can't compile a single WxWindows sample out of the box. - Biswa. > -----Original Message----- > From: Talucci Andrea [mailto:a.t...@pr...] > Sent: 21 November 2000 08:46 > To: dev...@li... > Subject: [Dev-C++] Compiler / Linker options > > > I all, I'm new to the list and dev-c++... > I am working at a small c++ open source prj running on winXX, > and we decided > to try compiling with other ide different from MS VC++6. All > works fine, > just few hacks with resource files. The problem is that > dev-c++ can't assign > to project name the same name of an existing .cpp file.. this > is not a great > problem of course... but in this way the output exe file should be > renamed... I passed a -o <outfile> as compiler/linker option > but I receive > an error msg informing that the -o options could not be > applyed to all files > (that is correct...). So how can I set the output file name ? > Should I use a > makefile ? > Thanks > Andrea > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: Talucci A. <a.t...@pr...> - 2000-11-21 08:44:23
|
I all, I'm new to the list and dev-c++... I am working at a small c++ open source prj running on winXX, and we decided to try compiling with other ide different from MS VC++6. All works fine, just few hacks with resource files. The problem is that dev-c++ can't assign to project name the same name of an existing .cpp file.. this is not a great problem of course... but in this way the output exe file should be renamed... I passed a -o <outfile> as compiler/linker option but I receive an error msg informing that the -o options could not be applyed to all files (that is correct...). So how can I set the output file name ? Should I use a makefile ? Thanks Andrea |
From: Chad S. <ho...@ho...> - 2000-11-21 04:40:11
|
I'm a pretty competent C++ programmer, but all my experience is with non-gui type programs of the type most often found running on unix systems. That being said I'm currently trying to learn the Win32 API and I have researched a lot of online tutorials, but when trying to compile an example program (which I've included below) with mingw in Bloodshed Dev-C++ I keep getting these errors: main.cpp: In function `int WinMain(void *, void *, CHAR *, int)': main.cpp:53: ANSI C++ forbids implicit conversion from `void *' in assignment main.cpp:69: ANSI C++ forbids implicit conversion from `void *' in argument passing However after a bit of research I found that I could compile with no errors if I use the preprocessor definition #define NO_STRICT Which basically insures that STRICT is not defined. So anyway, here's the code that's giving me problems. main.cpp ========================================================== //===================================// // Hello.C // // HELLO WORLD // //===================================// #include <windows.h> long APIENTRY WndProc( HWND hwnd, UINT msg, UINT wParam, LONG lParam ) { HDC hdc; PAINTSTRUCT ps; RECT rect; switch( msg ) { case WM_PAINT: hdc = BeginPaint( hwnd, &ps ); GetClientRect( hwnd, &rect ); DrawText( hdc, "Hello, World! (Windows Style)", -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER ); EndPaint( hwnd, &ps ); return( 0 ); case WM_DESTROY: // message: window being destroyed PostQuitMessage(0); break; default: // if msg unproccessed, // return to Windows return( DefWindowProc( hwnd, msg, wParam, lParam ) ); } return TRUE; } int APIENTRY WinMain( HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow ) { static char szAppName[] = "WinHello"; HWND hwnd; MSG msg; WNDCLASS wc; if( ! hPrevInstance ) { wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon( NULL, IDI_APPLICATION ); wc.hCursor = LoadCursor( NULL, IDC_ARROW ); wc.hbrBackground = GetStockObject( WHITE_BRUSH ); wc.lpszMenuName = NULL; wc.lpszClassName = szAppName; RegisterClass( &wc ); } hwnd = ::CreateWindow( szAppName, // window class name "My First Program: Hello World", // window caption WS_OVERLAPPEDWINDOW, // window style 100, // initial X position 100, // initial Y position 400, // initial X size 200, // initial Y size NULL, // parent window handle NULL, // window menu handle hInstance, // program instance handle NULL ); // creation parameters ShowWindow( hwnd, nCmdShow ); UpdateWindow( hwnd ); while( GetMessage( &msg, NULL, 0, 0 ) ) { TranslateMessage( &msg ); DispatchMessage( &msg ); } return msg.wParam; } ========================================================== Thanks in advance for any help, Chad Simmons _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com |
From: Ioannis V. <no...@ya...> - 2000-11-21 04:38:09
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > Alexei Podetlezhnikov > Sent: Thursday, November 16, 2000 4:30 AM > To: dev...@li... > Subject: [Dev-C++] (bug) passing a filename to a console program is broken > > > Passing a file name to a console program as a parameter requires full > path to work by clicking "Run" under IDE. Without full path the > executable is not able to locate and open the file. Normally, the > executable should find the file in the working directory. This means > that the environment option to "execute in directory of executable" is > not working even if checked. In fact, the executable runs in > c:\dev-c++\bin\ directory, I suspect. > > To observe the behavior > 1) run devcpp.exe from program menu. > 2) compile this program: > > #include<stdio.h> > > main(int argc, char** argv) > { > FILE *f; > > if ( argc > 1 ) > { > f=fopen(argv[1],"rt"); rt is invalid mode. You probably mean r+? Ioannis _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: lstar36 <ls...@fl...> - 2000-11-20 12:34:06
|
Your problem is that you need to read a file whic has the data in it. You can either write the array to a file or use your editor to generate a txt file with the dat in it. Then read in the data. I have modified your program to show you the last. You try to do the first. ----- Original Message ----- From: "Saundra Schwarz" <Sch...@ho...> To: <dev...@li...> Sent: Sunday, November 19, 2000 9:25 PM Subject: Re: [Dev-C++] Arrays > The problem is I have no idea where to start..... > > The assignment is a generic one in which the professor just has us playing > around with arrays to get used to using them....What is being asked of me is > to change the initialization statement in this program to have the array > initialized by the file....but I don't know where to begin.... > > > #include <stdio.h> > #include <stdlib.h> > > > void PrintArray(int[], int); > int SumArray(int[], int); > int DeleteElement(int[], int, int); > int InsertIndex(int[], int, int, int); > > > int main() > { > // int a[20] = {14,17,23,26,33,38,39,41,52,56,0,0,0,0,0,0,0,0,0,0}; > int a(24); > FILE *in; > int i, sum; > > > NumEls = 10, > DeleteIndex, > InsertIndex, > x; > > if (in = fopen ("Myfile.txt", "rt")) == NULL) > { > FPRINT(STDERR, "CANNOT OPEN INPUT FILE.\N") > exit(1); > } > i=0; > DO > { > a[i] = FGETC(in); > }WHILE(a(i++) != EOF || i <20); > > printf("Array at start of program:\n\n"); > PrintArray(a, NumEls); > printf("\n\n"); > > printf("The sum of these elements is %d.\n", SumArray(a, NumEls)); > > DeleteIndex = 5; > > printf("After deletion of %d:\n", a[DeleteIndex]); > > NumEls = DeleteElement(a, NumEls, DeleteIndex); > > PrintArray(a, NumEls); > printf("\n\n"); > > > printf("Enter a value to insert: "); > scanf("%d", &x); > printf("\n\n"); > > InsertIndex = 6; > > NumEls = InsertElement(a, NumEls, InsertIndex, x); > > PrintArray(a, NumEls); > > system("PAUSE"); > return 0; > } > > > > > void PrintArray(int b[], int NumEls) > { > int i; > > i = 9; > printf("The element at index %d is %d.\n\n", i, b[i]); > > printf("Array A has %d elements: ", NumEls); > > for (i = 0; i < NumEls; i++) > printf("%3d", b[i]); > > printf("\n"); > } > > > > int SumArray(int b[], int NumEls) > { > > int sum = 0; > int count = 0; > > for(count = 0; count < NumEls; count++) > { > sum += b[count]; > > }//end for statemnt > > return sum; > > } > > > > int DeleteElement(int b[], int NumEls, int DeleteIndex) > { > int count; > > for(count = DeleteIndex; count < NumEls; count++) > { > > b[count] = b[count + 1]; > > }//end of for statement > > NumEls--; > > return NumEls; > } > > int InsertElement(int b[], int NumEls, int InsertIndex, int x) > { > int count; > > for(count = NumEls + 1; count > InsertIndex; count--) > { > > b[count] = b[count - 1]; > > } > > > b[InsertIndex] = x; > > NumEls++; > > return NumEls; > } > > > ----- Original Message ----- > From: Chad Simmons <ho...@ho...> > To: <dev...@li...> > Sent: Sunday, November 19, 2000 3:55 PM > Subject: Re: [Dev-C++] Arrays > > > > >From: "Saundra Schwarz" <Sch...@ho...> > > >Reply-To: dev...@li... > > >To: <dev...@li...> > > >Subject: [Dev-C++] Arrays > > >Date: Sun, 19 Nov 2000 18:47:00 -0800 > > > > > >I have an assignment for school that is asking me to include a procedure > > >that reads 10 values from a text file to initialize an array. The > > >professor hasn't covered this aspect of arrays yet and I'm not finding > the > > >info in the text....I'm looking for general how to's....thanks. > > > > > >Sam > > > > Well, there's two main components to this problem. The first is reading > > numbers from a file. The second is assigning those numbers into an array. > > Which part is giving you trouble? (or is it both) Perhaps if you could > show > > how far you've gotten so far we may be able to give you some pointers as > to > > where to go next. > > > > Chad Simmons > > _________________________________________________________________________ > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > > Share information about yourself, create your own public profile at > > http://profiles.msn.com. > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: Saundra S. <Sch...@ho...> - 2000-11-20 00:25:40
|
The problem is I have no idea where to start..... The assignment is a generic one in which the professor just has us playing around with arrays to get used to using them....What is being asked of me is to change the initialization statement in this program to have the array initialized by the file....but I don't know where to begin.... #include <stdio.h> #include <stdlib.h> void PrintArray(int[], int); int SumArray(int[], int); int DeleteElement(int[], int, int); int InsertIndex(int[], int, int, int); int main() { int a[20] = {14,17,23,26,33,38,39,41,52,56,0,0,0,0,0,0,0,0,0,0}; int i, sum, NumEls = 10, DeleteIndex, InsertIndex, x; printf("Array at start of program:\n\n"); PrintArray(a, NumEls); printf("\n\n"); printf("The sum of these elements is %d.\n", SumArray(a, NumEls)); DeleteIndex = 5; printf("After deletion of %d:\n", a[DeleteIndex]); NumEls = DeleteElement(a, NumEls, DeleteIndex); PrintArray(a, NumEls); printf("\n\n"); printf("Enter a value to insert: "); scanf("%d", &x); printf("\n\n"); InsertIndex = 6; NumEls = InsertElement(a, NumEls, InsertIndex, x); PrintArray(a, NumEls); system("PAUSE"); return 0; } void PrintArray(int b[], int NumEls) { int i; i = 9; printf("The element at index %d is %d.\n\n", i, b[i]); printf("Array A has %d elements: ", NumEls); for (i = 0; i < NumEls; i++) printf("%3d", b[i]); printf("\n"); } int SumArray(int b[], int NumEls) { int sum = 0; int count = 0; for(count = 0; count < NumEls; count++) { sum += b[count]; }//end for statemnt return sum; } int DeleteElement(int b[], int NumEls, int DeleteIndex) { int count; for(count = DeleteIndex; count < NumEls; count++) { b[count] = b[count + 1]; }//end of for statement NumEls--; return NumEls; } int InsertElement(int b[], int NumEls, int InsertIndex, int x) { int count; for(count = NumEls + 1; count > InsertIndex; count--) { b[count] = b[count - 1]; } b[InsertIndex] = x; NumEls++; return NumEls; } ----- Original Message ----- From: Chad Simmons <ho...@ho...> To: <dev...@li...> Sent: Sunday, November 19, 2000 3:55 PM Subject: Re: [Dev-C++] Arrays > >From: "Saundra Schwarz" <Sch...@ho...> > >Reply-To: dev...@li... > >To: <dev...@li...> > >Subject: [Dev-C++] Arrays > >Date: Sun, 19 Nov 2000 18:47:00 -0800 > > > >I have an assignment for school that is asking me to include a procedure > >that reads 10 values from a text file to initialize an array. The > >professor hasn't covered this aspect of arrays yet and I'm not finding the > >info in the text....I'm looking for general how to's....thanks. > > > >Sam > > Well, there's two main components to this problem. The first is reading > numbers from a file. The second is assigning those numbers into an array. > Which part is giving you trouble? (or is it both) Perhaps if you could show > how far you've gotten so far we may be able to give you some pointers as to > where to go next. > > Chad Simmons > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: Chad S. <ho...@ho...> - 2000-11-19 23:55:55
|
>From: "Saundra Schwarz" <Sch...@ho...> >Reply-To: dev...@li... >To: <dev...@li...> >Subject: [Dev-C++] Arrays >Date: Sun, 19 Nov 2000 18:47:00 -0800 > >I have an assignment for school that is asking me to include a procedure >that reads 10 values from a text file to initialize an array. The >professor hasn't covered this aspect of arrays yet and I'm not finding the >info in the text....I'm looking for general how to's....thanks. > >Sam Well, there's two main components to this problem. The first is reading numbers from a file. The second is assigning those numbers into an array. Which part is giving you trouble? (or is it both) Perhaps if you could show how far you've gotten so far we may be able to give you some pointers as to where to go next. Chad Simmons _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. |
From: Saundra S. <Sch...@ho...> - 2000-11-19 23:47:25
|
I have an assignment for school that is asking me to include a procedure = that reads 10 values from a text file to initialize an array. The = professor hasn't covered this aspect of arrays yet and I'm not finding = the info in the text....I'm looking for general how to's....thanks. Sam |
From: A. Jans-B. <jan...@wx...> - 2000-11-19 19:21:13
|
I would like to know if anyone has/is using Allegro with DevCPP? I tried it and keep getting messages about missing include directories (but I seem to have set environment variables correctly ... or not?). These are the settings I use: set path=c:\dev-c++\bin;%path% SET C_INCLUDE_PATH=C:\dev-c++\include SET CPP_INCLUDE_PATH=C:\dev-c++\include\g++ SET GCC_EXEC_PREFIX=C:\dev-c++\lib SET LIBRARY_PATH=C:\dev-c++\lib Please send responses to jan...@wx... since I am not subscribed to the mailing list. |
From: Paul V. <van...@pr...> - 2000-11-18 23:43:51
|
AFAIK, there is no graphics.h header. That is a Borland header IIRC. If you want to do graphics with Dev-C++, look into DirectX. I believe some are also using the Win32 version of Allegro. Paul Vanukoff van...@pr... ----- Original Message ----- From: "thanasekar kasinathan" <th...@us...> To: <dev...@li...> Sent: Friday, November 17, 2000 11:43 AM Subject: [Dev-C++] Is there a graphics.h file ? > Hai Friends, > Is there a graphics.h header file in dev c/c++ compiler. > If yes let me know where it is located and how to use it. > Else, tellme where to download graphics.h file to be > used with my dev c/c++ compiler > > Thanks > K.Thanasekar > > ____________________________________________________________________ > Get free email and a permanent address at http://www.netaddress.com/?N=1 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: thanasekar k. <th...@us...> - 2000-11-17 18:43:08
|
Hai Friends, Is there a graphics.h header file in dev c/c++ compiler. If yes let me know where it is located and how to use it. Else, tellme where to download graphics.h file to be used with my dev c/c++ compiler Thanks K.Thanasekar ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1 |
From: thanasekar k. <th...@us...> - 2000-11-17 18:22:16
|
____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1 |
From: Ioannis V. <no...@ya...> - 2000-11-17 14:21:57
|
If you want to read in ASCII format use fgets(). If you want to read in raw data use fread(). > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of blalock > Sent: Wednesday, November 15, 2000 9:37 PM > To: dev...@li... > Subject: [Dev-C++] newbie question > > > Can I format input from a file inside of the file or do I have to do > this through code? I am trying to import characters into my program as > they are in the file. when I use fscanf it ignores the spaces. I was > wondering if there is a way to essentially cut and paste from a file to > my program including the spaces and returns. To explain, I am trying to > import ascii art into the introduction portion of my program, so the > input file needs to be formatted exactly as it is spaces and all. I am > taking a class in C, very new at this, so I am playing with it..... > thanks in advance for the reply. > Blalock > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com |
From: Sam s A. <sam...@ju...> - 2000-11-16 05:24:15
|
Oops, Sorry for mis-spelling your name SpiderMan. --- With apologies, Sam Sam...@ju... ________________________________________________________________ YOU'RE PAYING TOO MUCH FOR THE INTERNET! Juno now offers FREE Internet Access! Try it today - there's no risk! For your FREE software, visit: http://dl.www.juno.com/get/tagj. |