dev-cpp-users Mailing List for Dev-C++ (Page 3)
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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(14) |
|
2
(3) |
3
(9) |
4
(11) |
5
(15) |
6
(6) |
7
(6) |
8
(4) |
|
9
(7) |
10
(6) |
11
(11) |
12
(2) |
13
|
14
|
15
(6) |
|
16
(5) |
17
(4) |
18
(2) |
19
(2) |
20
(5) |
21
(7) |
22
(7) |
|
23
(2) |
24
(5) |
25
(2) |
26
(3) |
27
(2) |
28
(8) |
29
(5) |
|
30
(3) |
31
(3) |
|
|
|
|
|
|
From: jansb000 <jan...@wx...> - 2001-12-20 21:00:40
|
Rename to setup.zip (and not setup.zp). ----- Original Message ----- From: "L. C." <cla...@ho...> To: <dev...@li...> Sent: Sunday, December 16, 2001 7:26 PM Subject: [Dev-C++] Error message > I would appreciate if anyone could help me with the following:After > downloding devcpp and setup zip,whenever I try to open them, I get the > Message:"C:WINDOWS\Desktop\setup.zp is not a valid Win32 application". > Could anyone help me with this problem? > Thanks, > Claudia > > > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: John K. <jki...@po...> - 2001-12-20 20:29:06
|
How do I compile on the command line using gcc, g++, or another compiler , circumventing Dev-C++ (which I relly like))?. Specifically, I receive errors b/c of my #include statements (<iostream> and <string>), which I understand to be somehow "standard". When I use <stdio.h>, my code compiles fine. I will be moving to unix where I will only have gcc and other unix tools, and I am trying to get oriented to that environment. |
|
From: Kevin W. <ke...@me...> - 2001-12-19 16:00:48
|
As I understand it (I could be wrong) you are deleting the wrong thing.
The array is static - you did not use new to create it, so you shouldn't use
delete to get rid of it. Instead, you need to delete all the character
arrays that are pointed to by the pointers in the static array:
for(int i = 0; i < 2; i++)
for(int j = 0; j < 2; j++)
delete[] pArray[i][j];
Kev.
----- Original Message -----
From: Julio Lajara <ju2...@ya...>
To: <dev...@li...>
Sent: Wednesday, December 19, 2001 2:08 AM
Subject: [Dev-C++] warning when deleting allocated mem
> I can't figure out why the compiler gives me a warning
> about deleting the array in the following code:
>
>
> #include <iostream>
> #include <fstream>
> #include <cstdlib>
> using namespace std;
>
> ofstream fout;
> ifstream fin;
>
> int main()
> {
> char *pArray[2][2];
>
> for(int i = 0; i < 2; i++)
> for(int j = 0; j < 2; j++)
> pArray[i][j] = new char [10];
>
> strcpy(pArray[0][0],"1234567890");
> strcpy(pArray[0][1],"1112131415");
> strcpy(pArray[1][0],"1617181920");
> strcpy(pArray[1][1],"2122232425");
>
> cout << pArray << "\n\n";
>
> fout.open("writing 2D array from stack.ini",
> ios::out);
>
> if(fout.good())
> {
> fout.write(pArray, sizeof pArray);
> fout.close();
> }
> else
> {
> cout << "\n\nERROR, could not write data to
> file...";
> fout.close();
> }
>
> delete [] pArray;
> system("PAUSE");
> return 0;
> }
>
>
> Of course I can ignore the warning and it still runs
> fine, but I still would like to know why it is giving
> the warning...
>
> =====
> Julio
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Julio L. <ju2...@ya...> - 2001-12-19 02:09:03
|
I can't figure out why the compiler gives me a warning
about deleting the array in the following code:
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
ofstream fout;
ifstream fin;
int main()
{
char *pArray[2][2];
for(int i = 0; i < 2; i++)
for(int j = 0; j < 2; j++)
pArray[i][j] = new char [10];
strcpy(pArray[0][0],"1234567890");
strcpy(pArray[0][1],"1112131415");
strcpy(pArray[1][0],"1617181920");
strcpy(pArray[1][1],"2122232425");
cout << pArray << "\n\n";
fout.open("writing 2D array from stack.ini",
ios::out);
if(fout.good())
{
fout.write(pArray, sizeof pArray);
fout.close();
}
else
{
cout << "\n\nERROR, could not write data to
file...";
fout.close();
}
delete [] pArray;
system("PAUSE");
return 0;
}
Of course I can ignore the warning and it still runs
fine, but I still would like to know why it is giving
the warning...
=====
Julio
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
|
|
From: Jason H. <jas...@bt...> - 2001-12-18 18:41:58
|
The Arguments list for WinMain is:
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
);
As you can see there is a pointer to the command line, which is a null
terminated string. As for argc I think you need to parse the string yourself
in order to determine seperate options etc...
Jason.
----- Original Message -----
From: "Gregor Peter" <pe...@in...>
To: "dev cpp" <dev...@li...>
Sent: Tuesday, December 18, 2001 1:44 AM
Subject: [Dev-C++] main( int argc, char* argv[] ) equivalents at
winmain(...)?
> How to acsess parameters of a Windowsprogramm?
>
> A console aplication with those lines in main() ...
>
>
> int main( int argc, char* argv[]){
> statements;
> return 0;
> }//main
>
> ... which gets started like:
>
> main_exe option1 option2 ... optionXY
>
> ... is able to acsess it's calling parameters.
>
> How do I acess parameters provieded to my programm like the above under
> windows?
> Where do these parameters (argc argv[]) hide in WinMain( ... ) ?
>
> THANX
> Gregor (pe...@in...)
>
>
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Gregor P. <pe...@in...> - 2001-12-18 01:57:34
|
How to acsess parameters of a Windowsprogramm?
A console aplication with those lines in main() ...
int main( int argc, char* argv[]){
statements;
return 0;
}//main
... which gets started like:
main_exe option1 option2 ... optionXY
... is able to acsess it's calling parameters.
How do I acess parameters provieded to my programm like the above under
windows?
Where do these parameters (argc argv[]) hide in WinMain( ... ) ?
THANX
Gregor (pe...@in...)
|
|
From: Brian M. <str...@ho...> - 2001-12-17 16:02:48
|
<html><div style='background-color:'><DIV>i've found a page on DLL's.</DIV> <DIV>Here's the url</DIV> <DIV><A href="http://www.iseran.com/Win32/FAQ/section7.html#113">http://www.iseran.com/Win32/FAQ/section7.html#113</A></DIV></div><br clear=all><hr>MSN Photos is the easiest way to share and print your photos: <a href='http://go.msn.com/bql/hmtag3_etl_EN.asp'>Click Here</a><br></html> |
|
From: Daniel G. <sp...@ho...> - 2001-12-17 09:10:28
|
<html><div style='background-color:'><DIV> <P>Hey Jason,</P> <P>Nice description, very informative. Thanks from me!</P> <P>Daniel</P> <P><BR><BR> </P></DIV> <DIV></DIV> <DIV></DIV>>From: "Jason Hardman" <JAS...@BT...> <DIV></DIV>>To: "Dev-C++" <DEV...@LI...> <DIV></DIV>>Subject: Re: [Dev-C++] DLL's? <DIV></DIV>>Date: Mon, 17 Dec 2001 02:15:58 -0000 <DIV></DIV>> <DIV></DIV>>Seeing no other answers yet so I'll say what I know. <DIV></DIV>> <DIV></DIV>>A DLL or Dynamic Link Library is a way of way of distributing code that <DIV></DIV>>performs a task and is reusable. An ordinary library contains code for <DIV></DIV>>various functions, like the standard C and C++ libraries, and when used the <DIV></DIV>>library itself is added to the executable file and the only thing the <DIV></DIV>>compiler needs to know is the function prototypes. The code is connected to <DIV></DIV>>yours by the linker, which can sort out things like function call <DIV></DIV>>addresses/offsets. While this is fine for small and simple programs it <DIV></DIV>>becomes a problem for if you use many libraries because each adds to the <DIV></DIV>>size of your executable, and having several programs that use the same <DIV></DIV>>libraries will mean that there will be a copy of the same functions within <DIV></DIV>>several different executables. If a library changes, to fix a bug for <DIV></DIV>>example, then your code would need to be recompiled and the entire thing, <DIV></DIV>>which may be several megs, will need to be redistributed, or you would at <DIV></DIV>>least need to generate a patch. <DIV></DIV>> <DIV></DIV>>With a DLL the code is put into a seperate file and the system can be <DIV></DIV>>instructed to load in a particular DLL when needed, so your program can take <DIV></DIV>>advantage of the functionality the DLL provides. So the main executable is <DIV></DIV>>smaller for not having the extra code, you only need one copy of a DLL, <DIV></DIV>>saving disk space, and if several programs all need the same DLL at the same <DIV></DIV>>time then only one copy needs to be loaded into memory. An added benefit is <DIV></DIV>>that if you need to update the DLL, fixing bugs or adding new functionality, <DIV></DIV>>then all you need to replace is the DLL and you don't have to update all <DIV></DIV>>your executable that use it. <DIV></DIV>> <DIV></DIV>>That's the basic idea of a DLL, unfortunately I don't know much about <DIV></DIV>>creating and using them. I do know to use them then you have to instruct the <DIV></DIV>>system (Windows) to load in the DLL and you need to aquire information from <DIV></DIV>>the DLL to be able to call a specific function within it. Sometimes when <DIV></DIV>>using a particular library (such as DirectX) this part is done for you. <DIV></DIV>>Maybe there is a guide on the web somewhere that tells you the details of <DIV></DIV>>creation and use of DLL's. I think that different programming languages <DIV></DIV>>would have different mechanisms for making use of DLL's that fit with the <DIV></DIV>>complexity of the language. <DIV></DIV>> <DIV></DIV>>I hope this is of help, Jason. <DIV></DIV>> <DIV></DIV>>----- Original Message ----- <DIV></DIV>>From: "Johnny Dessì" <JD...@DA...> <DIV></DIV>>To: "Dev-Cpp" <DEV...@LI...> <DIV></DIV>>Sent: Sunday, December 16, 2001 5:38 PM <DIV></DIV>>Subject: Re: [Dev-C++] DLL's? <DIV></DIV>> <DIV></DIV>> <DIV></DIV>> > Nice Question! <DIV></DIV>> > I'd like to read some answer! <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > _______________________________________________ <DIV></DIV>> > Dev-cpp-users mailing list <DIV></DIV>> > Dev...@li... <DIV></DIV>> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>_______________________________________________ <DIV></DIV>>Dev-cpp-users mailing list <DIV></DIV>>Dev...@li... <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></div><br clear=all><hr>MSN Photos is the easiest way to share and print your photos: <a href='http://go.msn.com/bql/hmtag3_etl_EN.asp'>Click Here</a><br></html> |
|
From: Jason H. <jas...@bt...> - 2001-12-17 03:05:39
|
Seeing no other answers yet so I'll say what I know. A DLL or Dynamic Link Library is a way of way of distributing code that performs a task and is reusable. An ordinary library contains code for various functions, like the standard C and C++ libraries, and when used the library itself is added to the executable file and the only thing the compiler needs to know is the function prototypes. The code is connected to yours by the linker, which can sort out things like function call addresses/offsets. While this is fine for small and simple programs it becomes a problem for if you use many libraries because each adds to the size of your executable, and having several programs that use the same libraries will mean that there will be a copy of the same functions within several different executables. If a library changes, to fix a bug for example, then your code would need to be recompiled and the entire thing, which may be several megs, will need to be redistributed, or you would at least need to generate a patch. With a DLL the code is put into a seperate file and the system can be instructed to load in a particular DLL when needed, so your program can take advantage of the functionality the DLL provides. So the main executable is smaller for not having the extra code, you only need one copy of a DLL, saving disk space, and if several programs all need the same DLL at the same time then only one copy needs to be loaded into memory. An added benefit is that if you need to update the DLL, fixing bugs or adding new functionality, then all you need to replace is the DLL and you don't have to update all your executable that use it. That's the basic idea of a DLL, unfortunately I don't know much about creating and using them. I do know to use them then you have to instruct the system (Windows) to load in the DLL and you need to aquire information from the DLL to be able to call a specific function within it. Sometimes when using a particular library (such as DirectX) this part is done for you. Maybe there is a guide on the web somewhere that tells you the details of creation and use of DLL's. I think that different programming languages would have different mechanisms for making use of DLL's that fit with the complexity of the language. I hope this is of help, Jason. ----- Original Message ----- From: "Johnny Dessì" <jd...@da...> To: "Dev-Cpp" <dev...@li...> Sent: Sunday, December 16, 2001 5:38 PM Subject: Re: [Dev-C++] DLL's? > Nice Question! > I'd like to read some answer! > > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Jason H. <jas...@bt...> - 2001-12-17 00:36:10
|
Hi again! I like answering your questions sometimes. It's good practice for the skills I have managed to develop so far. I assume it's for a lesson or such? If you are generating an output string then using a string to store it isn't hard, all you need to do is append each letter as it is generated onto the output string, when you output it all you do is just reinitialise it to an empty string to start again. The C++ std::string would be best (use += to append), but it could be done with a C null terminated string, with a little more work, just keep track of the index (or pointer) into an array, move it on as you add each letter, and null terminate it before displaying. Just makesure that you don't overrun the arrays bounds. If you are looking to use a container type then a queue would be suited, push your letters into the queue and then, to display them, just pop them off one at a time until the queue is empty. As I like to I have made a small program that follows what you have said (AFAICT), but I don't know all the rules so you can implement the rest yourself. Jason. ----- Original Message ----- From: "chromatonus 712" <chr...@ho...> To: <dev...@li...> Sent: Sunday, December 16, 2001 8:23 PM Subject: [Dev-C++] encoding > using the numerical val of each letter a=1, b=2... z=26, and rules as > follows: > rule 1... multiply its numberical val by 2 > rule 2... divide its val by 3... > rule 3 > rule 4 (irrelevant, i can take care of them) > rule 5 > > so an input of C1B2F3$ would provide an output of GQI: > > C is 3, which becomes a 6 by rule 1 (the number right after) so counting 6 > letters from A, the result is G. B is 2, using rule 2 eval to 10 (ommitted > here) so counting 10 letters from G is Q. the $ prompts the output. > > When entering a new set like k2j3h2k1$ or b3n2j5$ or more, always start > counting with A. > > i tried to store the output letters in link-ed list but don't work. can you > please help asap? thank you! > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: chromatonus 7. <chr...@ho...> - 2001-12-16 20:23:52
|
using the numerical val of each letter a=1, b=2... z=26, and rules as follows: rule 1... multiply its numberical val by 2 rule 2... divide its val by 3... rule 3 rule 4 (irrelevant, i can take care of them) rule 5 so an input of C1B2F3$ would provide an output of GQI: C is 3, which becomes a 6 by rule 1 (the number right after) so counting 6 letters from A, the result is G. B is 2, using rule 2 eval to 10 (ommitted here) so counting 10 letters from G is Q. the $ prompts the output. When entering a new set like k2j3h2k1$ or b3n2j5$ or more, always start counting with A. i tried to store the output letters in link-ed list but don't work. can you please help asap? thank you! _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
|
From: L. C. <cla...@ho...> - 2001-12-16 18:27:05
|
I would appreciate if anyone could help me with the following:After downloding devcpp and setup zip,whenever I try to open them, I get the Message:"C:WINDOWS\Desktop\setup.zp is not a valid Win32 application". Could anyone help me with this problem? Thanks, Claudia _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
|
From: <jd...@da...> - 2001-12-16 17:39:08
|
Nice Question! I'd like to read some answer! |
|
From: <Dan...@ao...> - 2001-12-16 16:22:12
|
|
From: Brian M. <str...@ho...> - 2001-12-16 04:19:01
|
What exactly is a DLL, how can i use it, what goes into it, and can a BASIC program use a DLL written made by dev-C++? _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com |
|
From: http//:angelfire.com/dc/85 Sale's <bc...@ms...> - 2001-12-15 23:51:22
|
Get paid to do anything at my website.Get paid to do nothing.And get paid to chat and learn about c++,while you are getting paid to listin to the radio.It's Sweet. http://angelfire.com/dc/85 _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. |
|
From: Ian W. <lak...@ho...> - 2001-12-15 23:02:23
|
USING GLUT... hello people. i have two quick questions about opengl: 1) i know how to load a single texture and apply it to a 3D object, but does anybody know how to load two textures and apply them to different surfaces? 2) is there a way of displaying text when using opengl. e.g. like the frame rate in the top corner? thankyou in advance to anybody that can help. ian _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
|
From: Ian W. <lak...@ho...> - 2001-12-15 23:02:01
|
hello people. i have two quick questions about opengl: 1) i know how to load a single texture and apply it to a 3D object, but does anybody know how to load two textures and apply them to different surfaces? 2) is there a way of displaying text when using opengl. e.g. like the frame rate in the top corner? thankyou in advance to anybody that can help. ian _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
|
From: Sheik-Bahae S. <sh...@ya...> - 2001-12-15 21:17:53
|
Hi,
I have problem with Linker. when I compile my code I get the following linker messages:
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x27):pr_kiki.c: undefined reference to `robot_get_device'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x3e):pr_kiki.c: undefined reference to `robot_get_device'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x65):pr_kiki.c: undefined reference to `g_print'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xa4):pr_kiki.c: undefined reference to `robot_live'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xb4):pr_kiki.c: undefined reference to `robot_live'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xc9):pr_kiki.c: undefined reference to `distance_sensor_enable'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xde):pr_kiki.c: undefined reference to `distance_sensor_enable'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xee):pr_kiki.c: undefined reference to `supervisor_node_get_from_def'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x107):pr_kiki.c: undefined reference to `supervisor_field_get'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x134):pr_kiki.c: undefined reference to `g_print'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x147):pr_kiki.c: undefined reference to `distance_sensor_get_value'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x160):pr_kiki.c: undefined reference to `distance_sensor_get_value'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x1da):pr_kiki.c: undefined reference to `differential_wheels_set_speed'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x1e7):pr_kiki.c: undefined reference to `robot_step'
and my code is:
#include <stdio.h>
#include <robot.h>
#include <differential_wheels.h>
#include <distance_sensor.h>
#include <gtk/gtk.h>
#include <supervisor.h>
#define SPEED 100
static device_tag ir0,ir1;
void reset(void) {
ir0 = robot_get_device("ir0");
ir1 = robot_get_device("ir1");
g_print("ir0=%d ir1=%d\n",ir0,ir1);
}
int main() {
gint16 left_speed,right_speed;
guint16 ir0_value,ir1_value;
node_ref kiki;
gfloat a[3],b[3];
gint i=0;
//robot_live(NULL);
robot_live(reset);
distance_sensor_enable(ir0,64);
distance_sensor_enable(ir1,64);
kiki = supervisor_node_get_from_def("KIKI");
supervisor_field_get(kiki,SUPERVISOR_FIELD_TRANSLATION,(gpointer)a,64);
for(;;) { /* The robot never dies! */
g_print("KIKI is at (%g,%g,%g)\n",a[0],a[1],a[2]);
ir0_value = distance_sensor_get_value(ir0);
ir1_value = distance_sensor_get_value(ir1);
if ((ir1_value>200) && (ir0_value>200)){
left_speed = -20;
right_speed = -20;
}
else if (ir1_value>100) {
left_speed = -20;
right_speed = 20;
}
else if (ir0_value>100) {
left_speed = 20;
right_speed = -20;
}
else {
left_speed =SPEED;
right_speed=SPEED;
}
differential_wheels_set_speed(left_speed,right_speed); /* Set the motor speeds */
robot_step(64); /* run one step */
}
return 0;
}
---------------------------------
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts! |
|
From: Jason H. <jas...@bt...> - 2001-12-15 02:56:12
|
Why is your pop method wrong? I don't really understand why using a node
would be a problem. I assume that you are refering to the node pointer? The
only problem that I can see (at first look) is that initialize doesn't
delete any pointers that may be stored in the stack, but just discards them.
That would be a memory leak.
To use the stack all you need to do is declare an object of stacktype and
call it's members in the usual fasion.
//........... At top of code with other includes
#include "StackHeader.h"
//........... in code body
stacktype MyS;
// push some values onto stack
MyS.push(10);
for(int v = 0; v < 100; v += 5) MyS.push(v);
display(MyS);
add(MyS);
// pop off top value
int x = MyS.pop();
cout << "The value is: " << x << endl;
This code doesn't do anything in particular, it's just a demo.
If I have missed the point please try to explain in a little more detail.
Jason.
----- Original Message -----
From: "chromatonus 712" <chr...@ho...>
To: <dev...@li...>
Sent: Saturday, December 15, 2001 1:57 AM
Subject: [Dev-C++] linked list as stack
> hi, I was given the following header (can't change it, sorry) to write a
> calculator prgm using linked lists as stack (reverse polish notation or
> postfix)
>
> #include <iostream.h>
> #include <conio.h>
>
> struct node
> {
> int data;
> node *next;
> };
>
> class stacktype
> {
> public:
> // initial-value constructor
> stacktype( int );
> // postcondition: initialize list as STACK = NULL
> // top of stack will be the lead node
> // and will set screen row to initial value
> void initialize();
> // postcondition: object stack list is set to NULL
> // the screen display is cleared
> bool is_empty();
> // postcondition: return FALSE if stack = NULL otherwise
> // return TRUE
>
> void push( int );
> // postcondition: the entered data value will be placed at the HEAD
> // of the list, making it the TOP.
> // The second parameter is for the output to the screen
>
> int pop();
> // postcondition: the data at the HEAD (top) will be returned, and
the
> // head will be deleted from the list.
>
> private:
> node *mystack;
> int mytop, my_first_top;
> };
>
>
//==========================================================================
===
> //============================= Free functions
> ================================
>
//==========================================================================
===
> void draw_stack( int );
> // postcondition: draws stack using value from constructor as base value
> void add( stacktype & );
> // precondition: stack must have at least two elements.
> // postcondition: top two elements of stack are popped, added then pushed
> // back onto the stack
> // result will be displayed in output screen
> void subt( stacktype & );
> // precondition: stack must have at least two elements.
> // postcondition: top two elements of stack are popped, first one
> // subtracted from the second and the result
puched
> back
> // onto the stack
> // result will be displayed in output screen
> void mult( stacktype & );
> // precondition: stack must have at least two elements.
> // postcondition: top two elements of stack are popped, multiplied
> // together, and the product pushed back onto the stack
> // result will be displayed in output screen
> void display( stacktype );
> // postcondition: the top of the stack will be displayed in the output
> // screen. This wil be performed after each keystroke.
>
>
> :::::::This was part of what I wrote:
>
//==========================================================================
===
> //============================== Implementation
> ===============================
>
//==========================================================================
===
>
> stacktype::stacktype( int )
> {
> mystack = NULL;
> mytop = 0;
> my_first_top = 0;
> }
> void stacktype::initialize()
> {
> mystack = NULL;
> mytop = 0;
> my_first_top = 0;
> clrscr();
> //then it just displays a pretty picture
> int h, k;
> gotoxy(3,2);
> cout<< "> ";
> for(k=2; k<=22; k++)
> {
> gotoxy(60,k);
> cout<< "||";
> gotoxy(70,k);
> cout<< "||";
> }
> for(h=60; h<=71; h++)
> {
> gotoxy(h,21);
> cout<< "-";
> gotoxy(h,22);
> cout<< "-";
> }
> gotoxy(59,22);
> cout<< "-";
> gotoxy(72,22);
> cout<< "-";
> for(k=3; k<=20; k++)
> {
> for(h=62; h<=69; h++)
> {
> gotoxy(h,k);
> cout<< " ";
> }
> }
> gotoxy(50,10);
> cout<< "OUTPUT:";
> for(h=50; h<=56; h++)
> {
> gotoxy(h,11);
> cout<< "-";
> gotoxy(h,14);
> cout<< "-";
> }
> for(k=12; k<=13; k++)
> {
> gotoxy(49,k);
> cout<< "|";
> gotoxy(57,k);
> cout<< "|";
> }
> }
> bool stacktype::is_empty()
> {
> return (mystack == NULL);
> }
> void stacktype::push( int x )
> {
> mytop++;
> node *mm = new node;
> mm -> data = x;
> mm -> next = mystack;
> mystack = mm;
> gotoxy(62,21-mytop);
> cout<< x;
> gotoxy(50,13);
> cout<< x << " ";
> }
> int stacktype::pop()
> {
> gotoxy(62,20-mytop);
> cout<< " ";
> if( !is_empty() )
> {
> int x = mystack -> data;
> mytop--;
> node *j;
> j = mystack;
> mystack = mystack -> next;
> delete *j;
> gotoxy(50,13);
> cout<< x << " ";
> return x;
> }
> }
>
> my pop is wrong because i used nodes, but i don't know how to avoid the
> error, and how would you declare a stacktype using this header? thank you
> very much for your help :)
>
>
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: chromatonus 7. <chr...@ho...> - 2001-12-15 01:57:48
|
hi, I was given the following header (can't change it, sorry) to write a
calculator prgm using linked lists as stack (reverse polish notation or
postfix)
#include <iostream.h>
#include <conio.h>
struct node
{
int data;
node *next;
};
class stacktype
{
public:
// initial-value constructor
stacktype( int );
// postcondition: initialize list as STACK = NULL
// top of stack will be the lead node
// and will set screen row to initial value
void initialize();
// postcondition: object stack list is set to NULL
// the screen display is cleared
bool is_empty();
// postcondition: return FALSE if stack = NULL otherwise
// return TRUE
void push( int );
// postcondition: the entered data value will be placed at the HEAD
// of the list, making it the TOP.
// The second parameter is for the output to the screen
int pop();
// postcondition: the data at the HEAD (top) will be returned, and the
// head will be deleted from the list.
private:
node *mystack;
int mytop, my_first_top;
};
//=============================================================================
//============================= Free functions
================================
//=============================================================================
void draw_stack( int );
// postcondition: draws stack using value from constructor as base value
void add( stacktype & );
// precondition: stack must have at least two elements.
// postcondition: top two elements of stack are popped, added then pushed
// back onto the stack
// result will be displayed in output screen
void subt( stacktype & );
// precondition: stack must have at least two elements.
// postcondition: top two elements of stack are popped, first one
// subtracted from the second and the result puched
back
// onto the stack
// result will be displayed in output screen
void mult( stacktype & );
// precondition: stack must have at least two elements.
// postcondition: top two elements of stack are popped, multiplied
// together, and the product pushed back onto the stack
// result will be displayed in output screen
void display( stacktype );
// postcondition: the top of the stack will be displayed in the output
// screen. This wil be performed after each keystroke.
:::::::This was part of what I wrote:
//=============================================================================
//============================== Implementation
===============================
//=============================================================================
stacktype::stacktype( int )
{
mystack = NULL;
mytop = 0;
my_first_top = 0;
}
void stacktype::initialize()
{
mystack = NULL;
mytop = 0;
my_first_top = 0;
clrscr();
//then it just displays a pretty picture
int h, k;
gotoxy(3,2);
cout<< "> ";
for(k=2; k<=22; k++)
{
gotoxy(60,k);
cout<< "||";
gotoxy(70,k);
cout<< "||";
}
for(h=60; h<=71; h++)
{
gotoxy(h,21);
cout<< "-";
gotoxy(h,22);
cout<< "-";
}
gotoxy(59,22);
cout<< "-";
gotoxy(72,22);
cout<< "-";
for(k=3; k<=20; k++)
{
for(h=62; h<=69; h++)
{
gotoxy(h,k);
cout<< " ";
}
}
gotoxy(50,10);
cout<< "OUTPUT:";
for(h=50; h<=56; h++)
{
gotoxy(h,11);
cout<< "-";
gotoxy(h,14);
cout<< "-";
}
for(k=12; k<=13; k++)
{
gotoxy(49,k);
cout<< "|";
gotoxy(57,k);
cout<< "|";
}
}
bool stacktype::is_empty()
{
return (mystack == NULL);
}
void stacktype::push( int x )
{
mytop++;
node *mm = new node;
mm -> data = x;
mm -> next = mystack;
mystack = mm;
gotoxy(62,21-mytop);
cout<< x;
gotoxy(50,13);
cout<< x << " ";
}
int stacktype::pop()
{
gotoxy(62,20-mytop);
cout<< " ";
if( !is_empty() )
{
int x = mystack -> data;
mytop--;
node *j;
j = mystack;
mystack = mystack -> next;
delete *j;
gotoxy(50,13);
cout<< x << " ";
return x;
}
}
my pop is wrong because i used nodes, but i don't know how to avoid the
error, and how would you declare a stacktype using this header? thank you
very much for your help :)
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
|
|
From: <jd...@da...> - 2001-12-12 22:25:32
|
Another problem: How can I create a library (.a) with DEV-Cpp? Somebody could tell me where I can find a tool which converts the .lib in .a ? Thanks a lot. |
|
From: Luigi S. <gi...@li...> - 2001-12-12 09:29:28
|
Hi
Here I'll attempt to give you a possible explanation of the error messages
that you get.
I hope to make my explanation clearer by writing a trivial version of your
program.
dynarray.hpp dynarray.cpp
------------------------- -------------------------
#ifndef dynarray_hpp #include "dynarray.hpp"
#define dynarray_hpp ////////////////////////////
DynArray::DynArray(int size)
class DynArray {
{ n = size;
int n; // size p = new double[n];
double *p; // memory }
public: ////////////////////////////
DynArray(int); DynArray::~DynArray()
~DynArray(); {
} delete[] p;
#endif }
------------------------- -------------------------
main.cpp
-------------------------
#include "dynarray.hpp"
int
main()
{
DynArray a(3);
...
}
dynarray.hpp is an header file, it will be included, by a source file, when
the class DynArray is used by code placed in the source file (in fact it is
included by dynarray.cpp that defines the functions of the class and by
main.cpp that uses the class).
Probably your version of the class DynArray looks like this:
dynarray.hpp dynarray.cpp
------------------------- -------------------------
#ifndef dynarray_hpp #include "dynarray.hpp"
#define dynarray_hpp ////////////////////////////
DynArray::~DynArray()
class DynArray {
{ delete[] p;
int n; // size }
double *p; // memory -------------------------
public:
DynArray(int);
~DynArray();
}
#endif
////////////////////////////
DynArray::DynArray(int size)
{
n = size;
p = new double[n];
}
-------------------------
As you can see, in this case a definition of the constructor is found in
all the files that include the header file; in your program that means: one
definition in dynarray.cpp and one in main.cpp.
If you only compile the source files, you will get no error, the problem
arises when you attempt to build the binary file, in fact the linker will
find 2 definitions of the constructor: one in the object file created
compiling dynarray.cpp (dynarray.o) and one in the object file created from
main.cpp (main.o), since it knows that there must be only one definition,
it will point out the error.
A way to avoid the error, still keeping the definition of the constructor
in the header file, is to turn the constructor in an inline function: I
prefer to do so by placing the definition inside the class declaration,
instead of using the "inline" reserved word (but that is a question of
taste); so I would have written:
dynarray.hpp dynarray.cpp
------------------------- -------------------------
#ifndef dynarray_hpp #include "dynarray.hpp"
#define dynarray_hpp ////////////////////////////
DynArray::~DynArray()
class DynArray {
{ delete[] p;
int n; // size }
double *p; // memory -------------------------
public:
DynArray(int size)
{ n = size; p = new double[size]; }
~DynArray();
}
#endif
-------------------------
I hope the above helps.
At 10.38 09/12/01 -0500, Danny wrote:
>Hello again,
>I have managed to make some progress, only to run into larger problems.
>After including the files in one project and compiling, the Linker returns a
>long list of complaints:
>
>
>c:\cpp\array1\dynarray.o: In function `_8DynArrayi':
>file://file://c/cpp/array1/dynarray.cpp:25: multiple definition of
>`DynArray::DynArray(int)'
>c:\cpp\array1\main.o://C/cpp/array1/dynarray.cpp:25: first defined here
>c:\cpp\array1\dynarray.o: In function `_8DynArrayRC8DynArray':
>file://c/cpp/array1/dynarray.cpp:41: multiple definition of
>`DynArray::DynArray(DynArray const &)'
>c:\cpp\array1\main.o://C/cpp/array1/dynarray.cpp:41: first defined here
>
>
>It seems that I get this type of complaint for each function in the
>implementation file. What is the cause of this? Any ideas on what to do to
>solve this problem?
> ...
>
>Danny
--
gisan
gi...@li...
|
|
From: mak <ma...@pu...> - 2001-12-11 23:35:56
|
this is how to create a binary file in c(of course you can use it in c++)
#include <stdio.h>
FILE * filenum; //pointer to file
filenum=fopen("External file name","mode")
mode:r,w or a, read write,or appending
right after r,w or a type 'b' to open the file as binary
for example to create a binary file called my.dat write
FILE * f1;
f1=fopen("my.dat ","wb");
now to read and write to the file,you will use the functions
fread(buffer,siz,num,filenum);
which will read num values(of size siz) from the filenum file and store it
in the proper array named buffer.if a zero value is returned it means that
you have come to the end of the file.
to write you will use
fwrite(buffer,siz,num,filenum);
as above except that if the function returns the number of values written
to the file.
to seek values in the file use the function
fseek(filenum,(long)no_bytes,position);
the internal acces pointer of the file filenum will move no_bytes from
position.
position:0 start of file
1:current position
2:end of file
that's all. hope that helped
_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com
|
|
From: Ramana K. <ra...@my...> - 2001-12-11 22:38:15
|
I know how to save to binary, which doesn't look like text if opened in
notepad or something:
#include <fstream.h>
...
int anumber = 17;
char letters[7] = "hello!";
ofstream fout("path of file");
fout.write((char*) &anumber, sizeof anumber);
fout.write((char*) &letters, sizeof letters);
fout.close()
//to retrieve data
ifstream fin("path of file");
int savednumber;
fin.read((char*) &savednumber, sizeof savednumber);
...
that's the basic principle for it, it worked for me, and some things might
not be necessary (like the (char*) for letters), I'm not sure, but including
it shouldn't hurt.
You also might need to include stdlib.h if it doesn't work
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Ian Weston
Sent: mercredi 12 décembre 2001 04:18
To: Dev...@li...
Subject: [Dev-C++] creating files
hello, i was just wondering if anyone can help me. i want to be able to save
int's to a file and maybe even chars's. the thing is i don't want it to be
in text. so does anyone know how to save it as a binary file or what have
you.
thankyou.
ian
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|