Re: [Dev-C++] Please help me...why doesn't the code compile?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jose S. <dyo...@ho...> - 2001-08-12 02:36:53
|
It still doesn't work... :-( Please help anyone... >From: dev...@li... >Reply-To: dev...@li... >To: dev...@li... >Subject: Dev-cpp-users digest, Vol 1 #379 - 5 msgs >Date: Sat, 11 Aug 2001 12:01:26 -0700 > >Send Dev-cpp-users mailing list submissions to > dev...@li... > >To subscribe or unsubscribe via the World Wide Web, visit > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users >or, via email, send a message with subject or body 'help' to > dev...@li... > >You can reach the person managing the list at > dev...@li... > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Dev-cpp-users digest..." > > >Today's Topics: > > 1. Please help me...why doesn't the code compile? (Jose Samonte) > 2. Re: executeing programs (Richard) > 3. RE: executeing programs (Ioannis Vranos) > 4. Re: Please help me...why doesn't the code compile? (Vassili) > 5. Help with DLL entry point (Butler Justin) > >--__--__-- > >Message: 1 >From: "Jose Samonte" <dyo...@ho...> >To: dev...@li... >Date: Fri, 10 Aug 2001 23:56:09 +0000 >Subject: [Dev-C++] Please help me...why doesn't the code compile? >Reply-To: dev...@li... > >Please help me anyone... :-) >There are actually three files here; main.cpp, module1.cpp, and main.cpp. >I'm trying to separate the function prototypes into a header file, and put >the function body in a source file, since the function is generic enough to >be used in many programs, and I want to make it into a module, but it >doesn't compile... :-( >THANK YOU in advance!!! > > > >////////////////////////////////////////////////////// >// Module : main.cpp >// >// Purpose : Shows the usage of modular functions >////////////////////////////////////////////////////// > >#include <iostream.h> >#include "module1.h" > >void main() >{ > cout << "This is a test\n"; > cout << UCase("This is a test of UCase\n"); > cout << LCase("This is a test of LCase\n"); >} > >////////////////////////////////////////////////////// >// Module : module1.cpp >// >// Purpose : Shows the usage of modular functions >////////////////////////////////////////////////////// > >#include "module1.h" > >////////////////////////////////////////////////////// >// UCase() > >char* UCase(char *str) >{ > // Convert each char in the string to uppercase > // > int len = strlen(str); > for (int i = 0; i < len; i++) > str[i] = toupper(str[i]); > > return str; >} > >////////////////////////////////////////////////////// >// LCase() > >char* LCase(char *str) >{ > // Convert each char in the string to lowercase > // > int len = strlen(str); > for (int i = 0; i < len; i++) > str[i] = tolower(str[i]); > > return str; >} > >////////////////////////////////////////////////////// >// Module : module1.h >// >// Purpose : Interface for module1.cpp >////////////////////////////////////////////////////// > >#ifndef __MODULE1_H__ >#define __MODULE1_H__ > >#include <stdlib.h> >#include <ctype.h> >#include <string.h> > >// Function prototypes >// >extern char* LCase(char *str); >extern char* UCase(char *str); > >#endif //__MODULE1_H__ > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > >--__--__-- > >Message: 2 >Date: Sat, 11 Aug 2001 14:29:54 +0200 >From: Richard <ri...@cc...> >Subject: Re: [Dev-C++] executeing programs >To: dev...@li... >Reply-To: dev...@li... > >Try using : > >system("PAUSE"); > >Insert it at the end of the main() section in your program. > >It will cause the programme to pause just before it terminates. They only >thing is that it will show a line on the screen notifing you to press a key >to continue. This could become a bit anoying... > >Later, >Richard > >-----Original Message----- > From: dev...@li... >[mailto:dev...@li...]On Behalf Of Mary Ward > Sent: Thursday, August 09, 2001 8:33 AM > To: dev...@li... > Subject: [Dev-C++] executeing programs > > > Ok i made my first program the today and I compiled and executed it. I >had >no errors but when i executed it a little black screen popped up very >quickly and then went away. What happened? Did i do something wrong? > > Nate > reply to blu...@mi... > > > > >--__--__-- > >Message: 3 >From: "Ioannis Vranos" <no...@ya...> >To: <dev...@li...> >Subject: RE: [Dev-C++] executeing programs >Date: Sat, 11 Aug 2001 17:58:28 +0200 >Reply-To: dev...@li... > >well there is always system("pause >null"); (i have been a dos guy) :) > > >Ioannis > >* Ioannis Vranos >* Programming pages: http://www.noicys.f2s.com >* Alternative URL: http://run.to/noicys > > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...] On Behalf > > Of Richard > > Sent: Saturday, August 11, 2001 2:30 PM > > To: dev...@li... > > Subject: Re: [Dev-C++] executeing programs > > > > > > Try using : > > > > system("PAUSE"); > > > > Insert it at the end of the main() section in your program. > > > > It will cause the programme to pause just before it > > terminates. They only thing is that it will show a line on > > the screen notifing you to press a key to continue. This > > could become a bit anoying... > > > > Later, > > Richard > > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...]On Behalf > > Of Mary Ward > > Sent: Thursday, August 09, 2001 8:33 AM > > To: dev...@li... > > Subject: [Dev-C++] executeing programs > > > > > > Ok i made my first program the today and I compiled and > > executed it. I had no errors but when i executed it a little > > black screen popped up very quickly and then went away. What > > happened? Did i do something wrong? > > > > Nate > > reply to blu...@mi... > > > > > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > >--__--__-- > >Message: 4 >From: "Vassili" <v.v...@bt...> >To: <dev...@li...> >Subject: Re: [Dev-C++] Please help me...why doesn't the code compile? >Date: Sat, 11 Aug 2001 17:02:45 +0100 >Reply-To: dev...@li... > >If your going to use pointers and arrays, always have an address to store >data, ditto for char, int, float,...,etc. > >try using something like:- > >#include <iostream.h> >#include "module1.h" > >void main() >{ > // Initialised plus somewhere to store data > char str1[] = "This is a test of UCase"; > char str2[] = "This is a test of LCase"; > > // Pass the address of strings and display the > // modified data, which is the returned address > cout << "This is a test\n" > << UCase(str1) << endl > << LCase(str2) << endl; >} > >----- Original Message ----- >From: "Jose Samonte" <dyo...@ho...> >To: <dev...@li...> >Sent: Saturday, August 11, 2001 12:56 AM >Subject: [Dev-C++] Please help me...why doesn't the code compile? > > > > Please help me anyone... :-) > > There are actually three files here; main.cpp, module1.cpp, and >main.cpp. > > I'm trying to separate the function prototypes into a header file, and >put > > the function body in a source file, since the function is generic enough >to > > be used in many programs, and I want to make it into a module, but it > > doesn't compile... :-( > > THANK YOU in advance!!! > > > > > > > > ////////////////////////////////////////////////////// > > // Module : main.cpp > > // > > // Purpose : Shows the usage of modular functions > > ////////////////////////////////////////////////////// > > > > #include <iostream.h> > > #include "module1.h" > > > > void main() > > { > > cout << "This is a test\n"; > > cout << UCase("This is a test of UCase\n"); > > cout << LCase("This is a test of LCase\n"); > > } > > > > ////////////////////////////////////////////////////// > > // Module : module1.cpp > > // > > // Purpose : Shows the usage of modular functions > > ////////////////////////////////////////////////////// > > > > #include "module1.h" > > > > ////////////////////////////////////////////////////// > > // UCase() > > > > char* UCase(char *str) > > { > > // Convert each char in the string to uppercase > > // > > int len = strlen(str); > > for (int i = 0; i < len; i++) > > str[i] = toupper(str[i]); > > > > return str; > > } > > > > ////////////////////////////////////////////////////// > > // LCase() > > > > char* LCase(char *str) > > { > > // Convert each char in the string to lowercase > > // > > int len = strlen(str); > > for (int i = 0; i < len; i++) > > str[i] = tolower(str[i]); > > > > return str; > > } > > > > ////////////////////////////////////////////////////// > > // Module : module1.h > > // > > // Purpose : Interface for module1.cpp > > ////////////////////////////////////////////////////// > > > > #ifndef __MODULE1_H__ > > #define __MODULE1_H__ > > > > #include <stdlib.h> > > #include <ctype.h> > > #include <string.h> > > > > // Function prototypes > > // > > extern char* LCase(char *str); > > extern char* UCase(char *str); > > > > #endif //__MODULE1_H__ > > > > _________________________________________________________________ > > Get your FREE download of MSN Explorer at >http://explorer.msn.com/intl.asp > > > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > >--__--__-- > >Message: 5 >Date: Sat, 11 Aug 2001 09:51:15 -0700 (PDT) >From: Butler Justin <dub...@ya...> >To: dev...@li... >Subject: [Dev-C++] Help with DLL entry point >Reply-To: dev...@li... > >I can make a C EXE, but I have no clue how to make a >DLL for use in VB, because it needs an entry point. I >have no clue where to put anything, I can't find any >help on bloodshed.net or its linked pages, and the >comments with the wizard-generated project are as >unhelpful as ever, and VB says it can't find the "DLL >entry point" when I declare the function even with a >compiled DLL of the project DEV generates. Is it >possible any of you can help me? Thanks. > >__________________________________________________ >Do You Yahoo!? >Send instant messages & get email alerts with Yahoo! Messenger. >http://im.yahoo.com/ > > > >--__--__-- > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >End of Dev-cpp-users Digest _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |