Thread: Re: [Dev-C++] (no subject) (Page 13)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Verne H. B. <ve...@sy...> - 2005-04-13 14:40:51
|
The answer to this is simple. READ A BOOK ON SIMPLE C++ AND LEARN THE = FUNDAMENTALS FROM THE BOOK. There are an awful lot available if you do = a simple search or go to a book store. Verne 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: jose i. c. <ji...@gm...> - 2005-04-13 17:50:19
|
Was that really needed? Don't help, if you don't want to help. On 4/13/05, Verne H. Bohlender <ve...@sy...> wrote: > The answer to this is simple. READ A BOOK ON SIMPLE C++ AND LEARN THE > FUNDAMENTALS FROM THE BOOK. There are an awful lot available if you do a > simple search or go to a book store. > Verne >=20 >=20 > Hi. I'm new to programming, and don't know all the terminology, so please= go > easy on me. > =20 > 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. > =20 > Here's my simple test program that didn't work in the least ^^=20 > =20 > __________________________________________________ > =20 > the program I tried to link to: >=20 > #include<iostream> > =20 > using namespace std; > =20 >=20 > int subten(int num) > { > num -=3D 10; > return num; > } > The program I tried to link to the above with: > =20 > #include <iostream> > #include "subten" > using namespace std; > =20 > main() > { > =20 > int a =3D 20; > cout << a << endl;=20 > a=3Dsubten(a); > cout << a; > =20 > 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. > =20 --=20 The Bible is not politically correct! |
From: Austin S. <Aus...@co...> - 2005-04-13 21:44:54
|
well, I thank you for your opinion, and, for your knowledge, I have a book, and am also taking a class. Now, I may be mistaken, but I thought this mailing list was a way one can ask for help if he has a problem. I had a problem, and had the idea that if I asked for help, rather than spend hours searching google or finding just the right book for the job, the nice coders here on the mailing list would be happy to help me correct a simple mistake I made and if you notice, Verne, someone has. My problem is fixed, and I can progress in my learning, and hopefully won't have to ask for help again. now, I've seen you help other people with there problems, and I'm getting the distinct since that this problem wasn't good enough to warrant your time. now, that's just my impression. please correct me if I'm wrong. ____________________________________________ The answer to this is simple. READ A BOOK ON SIMPLE C++ AND LEARN THE FUNDAMENTALS FROM THE BOOK. There are an awful lot available if you do a simple search or go to a book store. Verne |
From: <jal...@go...> - 2005-05-26 14:20:51
|
Howdy folks! I have installed the GTK+ runtime as well as the GTK+ development libraries on my MSW-XP; I would like to use Code::Block or Dev-C++ as the IDE, but I have found that none of these IDEs have default settings for GTK+. I have tried to get the right settings on my own, but to now avail. So, I was wondering if someone here could give me a hand on this one. TIA |
From: Daniel K. O. <dan...@ya...> - 2005-05-26 16:07:02
|
jal...@go... wrote: >I have installed the GTK+ runtime as well as the GTK+ development >libraries on my MSW-XP; I would like to use Code::Block or Dev-C++ as the >IDE, but I have found that none of these IDEs have default settings for >GTK+. I have tried to get the right settings on my own, but to now avail. >So, I was wondering if someone here could give me a hand on this one. > > Maybe this can be of some help: http://danielko.objectis.net/programming/gtk_win32_tutorial -- Daniel K. O. ____________________________________________________ Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br |
From: <jal...@go...> - 2005-05-27 03:21:39
|
Thank you Daniel for your prompt response. I did as you suggested and followed the instruction in the '.../gtk_win32_tutorial', it was very informative. However, when trying t= o compile the program suggested by the above webpage I get the following error: Compiler: Default compiler --- Building Makefile: "C:\tmp\Makefile.win" Executing make... make.exe -f "C:\tmp\Makefile.win" all g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include= " -mms-bitfields `pkg-config gtk+-2.0 --cflags` cc1plus.exe: error: unrecognized command line option "-fcflags`" g++.exe: `pkg-config: No such file or directory g++.exe: gtk+-2.0: No such file or directory make.exe: *** [main.o] Error 1 Execution terminated ---- What could be wrong? Again thanks so much for the help. > jal...@go... wrote: > >>I have installed the GTK+ runtime as well as the GTK+ development >>libraries on my MSW-XP; I would like to use Code::Block or Dev-C++ as t= he >>IDE, but I have found that none of these IDEs have default settings for >>GTK+. I have tried to get the right settings on my own, but to now avai= l. >>So, I was wondering if someone here could give me a hand on this one. >> >> > > Maybe this can be of some help: > http://danielko.objectis.net/programming/gtk_win32_tutorial > > > -- > Daniel K. O. > > > > > > ____________________________________________________ > Yahoo! Mail, cada vez melhor: agora com 1GB de espa=E7o gr=E1tis! > http://mail.yahoo.com.br > |
From: Per W. <pw...@ia...> - 2005-05-27 03:57:54
|
When specifying `something` on the commandline, that means that `something` is an application, and that the output of that application should be used as command-line parameter. This is a quite common way to configure programs on Unix machines, but Windows doesn't support this feature. Manually run whatever command is specified within `` and take the printed output and insert instead (while removing the ``). /Per W On Fri, 27 May 2005 jal...@go... wrote: > Thank you Daniel for your prompt response. > I did as you suggested and followed the instruction in the > '.../gtk_win32_tutorial', it was very informative. However, when trying to > compile the program suggested by the above webpage I get the following > error: > Compiler: Default compiler > --- > Building Makefile: "C:\tmp\Makefile.win" > Executing make... > make.exe -f "C:\tmp\Makefile.win" all > g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" > -mms-bitfields `pkg-config gtk+-2.0 --cflags` > > cc1plus.exe: error: unrecognized command line option "-fcflags`" > > g++.exe: `pkg-config: No such file or directory > g++.exe: gtk+-2.0: No such file or directory > > make.exe: *** [main.o] Error 1 > > Execution terminated > ---- > > What could be wrong? > > Again thanks so much for the help. > > jal...@go... wrote: > > > >>I have installed the GTK+ runtime as well as the GTK+ development > >>libraries on my MSW-XP; I would like to use Code::Block or Dev-C++ as the > >>IDE, but I have found that none of these IDEs have default settings for > >>GTK+. I have tried to get the right settings on my own, but to now avail. > >>So, I was wondering if someone here could give me a hand on this one. > >> > >> > > > > Maybe this can be of some help: > > http://danielko.objectis.net/programming/gtk_win32_tutorial > > > > > > -- > > Daniel K. O. |
From: Daniel K. O. <dan...@ya...> - 2005-05-27 06:55:49
|
jal...@go... wrote: >What could be wrong? > > You could try reading until the end. The item [4] says exactly what Per W said. I think that this problem is related to the make version. Seems that yours isn't expanding the `` command. What's the output for "make --version"? Mine (MSYS' make.exe 3.79.1 and mingw32-make.exe 3.80) work fine. If I try "make --win32" then it gives the same error. -- Daniel K. O. ____________________________________________________ Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br |
From: <jal...@go...> - 2005-05-27 13:07:15
|
YES!! It did the trick, but the DOS prompt pops up when I run the program, is there a fix for this? Thanks Daney and Per, you guys are the best!! > When specifying `something` on the commandline, that means that > `something` is an application, and that the output of that application > should be used as command-line parameter. > > This is a quite common way to configure programs on Unix machines, but > Windows doesn't support this feature. > > Manually run whatever command is specified within `` and take the print= ed > output and insert instead (while removing the ``). > > /Per W > > On Fri, 27 May 2005 jal...@go... wrote: > >> Thank you Daniel for your prompt response. >> I did as you suggested and followed the instruction in the >> '.../gtk_win32_tutorial', it was very informative. However, when tryin= g >> to >> compile the program suggested by the above webpage I get the following >> error: >> Compiler: Default compiler >> --- >> Building Makefile: "C:\tmp\Makefile.win" >> Executing make... >> make.exe -f "C:\tmp\Makefile.win" all >> g++.exe -c main.cpp -o main.o >> -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" >> -mms-bitfields `pkg-config gtk+-2.0 --cflags` >> >> cc1plus.exe: error: unrecognized command line option "-fcflags`" >> >> g++.exe: `pkg-config: No such file or directory >> g++.exe: gtk+-2.0: No such file or directory >> >> make.exe: *** [main.o] Error 1 >> >> Execution terminated >> ---- >> >> What could be wrong? >> >> Again thanks so much for the help. >> > jal...@go... wrote: >> > >> >>I have installed the GTK+ runtime as well as the GTK+ development >> >>libraries on my MSW-XP; I would like to use Code::Block or Dev-C++ a= s >> the >> >>IDE, but I have found that none of these IDEs have default settings >> for >> >>GTK+. I have tried to get the right settings on my own, but to now >> avail. >> >>So, I was wondering if someone here could give me a hand on this one= . >> >> >> >> >> > >> > Maybe this can be of some help: >> > http://danielko.objectis.net/programming/gtk_win32_tutorial >> > >> > >> > -- >> > Daniel K. O. > > |
From: Lukas 'C. M. <gry...@gm...> - 2005-05-28 00:43:01
|
I believe adding -mwindows to the project's linker options will fix this. -Lukas On 5/27/05, jal...@go... <jal...@go...> wrote: > YES!! > It did the trick, but the DOS prompt pops up when I run the program, is > there a fix for this? >=20 > Thanks Daney and Per, you guys are the best!! |
From: <jal...@go...> - 2005-05-28 13:59:17
|
Outstandign my friend!! Nobody likes kiss-ass, but I must say... You guys in this group are the B= EST. Thanks Lucas your suggestion woked perfectly, just perfectly. Have an good weekend!! > I believe adding -mwindows to the project's linker options will fix thi= s. > > -Lukas > > On 5/27/05, jal...@go... <jal...@go...> wrote: >> YES!! >> It did the trick, but the DOS prompt pops up when I run the program, i= s >> there a fix for this? >> >> Thanks Daney and Per, you guys are the best!! > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=3Doffad-ysdn-ostg-q= 22005 > _______________________________________________ > 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: <jal...@go...> - 2005-06-24 15:35:02
|
After creating the top window, which contarins a menu, I want to creat either a dialog box or another window that will house several widgets. My question is should I create another window or should I create a widget that will handle the input from the user? Thanks folks! |
From: Antonio G. <ton...@gm...> - 2005-06-24 19:59:51
|
Why not create only one more window (or gtk_dialog, you know) and place your widgets in it? is wouldn't be enough ?! regards On 6/24/05, jal...@go... <jal...@go...> wrote: > After creating the top window, which contarins a menu, I want to creat > either a dialog box or another window that will house several widgets. My > question is should I create another window or should I create a widget > that will handle the input from the user? >=20 > Thanks folks! > _______________________________________________ > gtk-list mailing list > gtk...@gn... > http://mail.gnome.org/mailman/listinfo/gtk-list >=20 --=20 Antonio Gomes E-mail: ant...@in... Embedded Linux Lab - 10LE INdT - Instituto Nokia de Tecnologia (Manaus/Br) NOKIA's Technology Institute |
From: <jal...@go...> - 2005-06-30 12:30:28
|
In my class, when I use the "getter" to display the value I get the right output, but when I try using the overloaded extractor operator (<<) I get some hex value displayed. Here is some of the code: --- snip Main.cpp int main() { Money money("12.21"); std::cout << "Value is: " << money.getAmount() << std::endl; // 12.21 std::cout << "Value is: " << money << std::endl; // hex value???? return 0; } The class goes like this: ---snip Money.hpp class Money { protected: float amount; //!< This variable holds the numerical value public: //! Constor Money(const std::string&); //!Copy constructor Money( const Money& ); //!Destructor ~Money() { std::cout << amount << std::endl;} //<<=3D=3D=3D 12.21 // Setters ... // Getters const float getAmount() const; // Overloaded operators ..... friend std::ostream& operator<<( std::ostream&, const jme::Money& ); friend std::istream& operator>>( std::istream&, jme::Money& ); .... } ; //Money and the code looks like this --- snip jme::Money::Money( const std::string& x){ this->setAmount(x); // this metho converts the std::string to a float } const float jme::Money::getAmount() const { return this->amount; } std::ostream& jme::operator<<( std::ostream& os, const jme::Money& obj ) { os << obj.getAmount(); //<<=3D=3D=3D=3D 0x4b1120 return os; } ----- end of snip As you can see when using the member method getAmount() the value displayed is in the right format, however the extractor operator is not doing the job I thought it would. Can anybody tell me what I am doing wrong? TIA |
From: Robert A. <ral...@gm...> - 2005-07-02 13:21:04
|
Hello, I will hazzard a guess that you are getting the address of the function rather than the value, but I did notice two things that you may want to review. The first is that you don't beed the friend declarations since you are using a public method. If you want to grant special permission to the function then you can access the 'protected' "amount" directly but if you don't need special permission (which you don't when you use the getter function) you can drop the friend. The big question is that is 'jme' in "jme::Money" are you working inside a separate class or namespace? The Money class in main doesn't seem to be referenced as such so it's not clear why it's there. It's possible that if you have been making many changes and that's a hold over than you are really referencing a different item? Hope this helps, Robert On 6/30/05, jal...@go... <jal...@go...> wrote: > In my class, when I use the "getter" to display the value I get the right > output, but when I try using the overloaded extractor operator (<<) I get > some hex value displayed. Here is some of the code: > --- snip > Main.cpp > int main() { > Money money("12.21"); >=20 > std::cout << "Value is: " << money.getAmount() << std::endl; // 12.21 > std::cout << "Value is: " << money << std::endl; // hex value???? > return 0; > } >=20 >=20 >=20 > The class goes like this: > ---snip > Money.hpp > class Money { > protected: > float amount; //!< This variable holds the numerical value > public: > //! Constor > Money(const std::string&); >=20 > //!Copy constructor > Money( const Money& ); >=20 > //!Destructor > ~Money() { std::cout << amount << std::endl;} //<<=3D=3D=3D 12.21 >=20 > // Setters > ... > // Getters > const float getAmount() const; >=20 > // Overloaded operators > ..... > friend std::ostream& operator<<( std::ostream&, const jme::Money& ); > friend std::istream& operator>>( std::istream&, jme::Money& ); > .... > } ; //Money >=20 >=20 >=20 > and the code looks like this > --- snip > jme::Money::Money( const std::string& x){ > this->setAmount(x); // this metho converts the std::string to a float > } > const float jme::Money::getAmount() const { > return this->amount; > } > std::ostream& > jme::operator<<( std::ostream& os, const jme::Money& obj ) { > os << obj.getAmount(); //<<=3D=3D=3D=3D 0x4b1120 > return os; > } > ----- end of snip > As you can see when using the member method getAmount() the value > displayed is in the right format, however the extractor operator is not > doing the job I thought it would. >=20 > Can anybody tell me what I am doing wrong? >=20 > TIA >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > 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: majdi m. <maj...@ya...> - 2005-08-15 07:57:38
|
confirm 211322 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: <dic...@tt...> - 2005-09-07 00:04:14
|
confirm 553567 |
From: <Cla...@ao...> - 2005-09-08 21:50:14
|
I obtained my second copy a of a Dev-C platform. When I try to run a program on Dev-C it runs the a previous program instead of the most recent file I had compiled. I have obtained a second copy of the Dev-C platform but it does the same thing. I was wondering is there a file that I need to include or to remove so that it runs the currently file? Sincerely C. Lowery |
From: ryu h. <he...@ho...> - 2005-11-13 16:39:13
|
Hi im having problems with my dev-c++, when i try to uninstall it. UninstallShield opens to close after a few seconds then i get a message that reads (unable to locate the installation logfile `c:\program\DeIsL1.isv`.Uninstallation will not continue) Someone that can help me with this problem?? Edd _________________________________________________________________ Nyhet! Hotmail direkt i din Mobil! http://mobile.msn.com/ |
From: David M. <jac...@sb...> - 2005-12-14 15:14:53
|
Unsubscrbe This address |
From: Eric R. <eri...@cl...> - 2005-12-17 08:03:13
|
No why should I, I have not done the group any harm ----- Original Message -----=20 From: David Miller=20 To: Dev...@li...=20 Sent: Thursday, December 15, 2005 4:14 AM Subject: [Dev-C++] (no subject) Unsubscrbe This address |
From: <sw...@ma...> - 2005-12-19 15:57:27
|
Who knows how i can connect to MS SQL Server? |
From: Ben M. <ben...@ya...> - 2006-01-05 03:16:00
|
A quick question, by someone very new to c++. I have a for loop I am putting in a project, this is what it looks like. for(i = 10; i != 0; i--) { cout >> i >> endl; } When i comple it, it will just show all the numbers at once. My question is, how do I make the program pause itself, then start itself again, after each number is shown? I want it to be like a count down. Thank you very much. --------------------------------- Yahoo! DSL Something to write home about. Just $16.99/mo. or less |
From: Reid T. <rei...@at...> - 2006-01-05 05:35:50
|
Ben Miller wrote: > A quick question, by someone very new to c++. > I have a for loop I am putting in a project, this is what it looks like. > for(i = 10; i != 0; i--) > { > cout >> i >> endl; sleep(3); > } > > When i comple it, it will just show all the numbers at once. > My question is, how do I make the program pause itself, then start > itself again, after each number is shown? > I want it to be like a count down. > > Thank you very much. > > ------------------------------------------------------------------------ > Yahoo! DSL > <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=37474/*http://promo.yahoo.com/broadband/%20> > Something to write home about. Just $16.99/mo. or less |
From: Alfred P. R. <al...@ya...> - 2006-01-06 00:05:35
|
I would also recommend cout << i << endl; Your form would probably input cout to the variable i then input that into endl ??? Ben Miller <ben...@ya...> wrote: A quick question, by someone very new to c++. I have a for loop I am putting in a project, this is what it looks like. for(i = 10; i != 0; i--) { cout >> i >> endl; } Alfred P. Reaud |