dev-cpp-users Mailing List for Dev-C++ (Page 319)
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: <ri...@un...> - 2003-09-15 17:04:17
|
question 1): Try to build a program with the 2 possibilities you are proposing and keep the running time in both cases... after that, you could tell us the result... as you say it seems that there wont be any difference, that is, the final binary code is the same in both cases. question 2): the main function is not needed to run, if not essentially to compile the code...without the main function the compiler doesnot know where the nucleus of the program is, then the compiler can not compile... it is the 'door' toward the code...without 'door' you can not go into... hope it helps you, Ricardo. |
|
From: <and...@su...> - 2003-09-15 16:18:12
|
-----Mensagem original----- De: André Macário Barros [mailto:and...@su...] Enviada em: domingo, 14 de setembro de 2003 21:13 Para: Per Westermark Assunto: RES: [Dev-C++] Two Questions I have here one version of K&R, another copy of Deitel´s, some others books and some links that I didn´t find theese answers. Yes, this is one kind of school work. My students did theese questions and I didn´t find on the books the correct answer for both cases. I have a feeling about the probable answers, I can make some practical tests to check this, but this can´t be a answer from a teacher. In this position, I can´t give some answers without the respective bibliography for the student look for more information. If anyone of you can give me theese answers it would be great. Thanks in advance. Andre Barros -----Mensagem original----- De: Per Westermark [mailto:pw...@ia...] Enviada em: domingo, 14 de setembro de 2003 19:52 Para: André Macário Barros Cc: Dev-Cpp-Users Assunto: Re: [Dev-C++] Two Questions Bibliographic references are for school work and are better located by yourself. /Per W On Sun, 14 Sep 2003, André Macário Barros wrote: > Dear Users, > > 1) Does exist any difference in speed with C codes that use > > function prototypes > main function > function definitions > > or > > function definitions > main function > > 2) Does a C code need the entitled "main" function to run alone? Please, > disconsider the WinMain case > > Fellows, if possible, together with the answers, please indicate > bibliography > or link that contains the answers. > > Regards > Andre Barros > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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: Michael D. S. <for...@hi...> - 2003-09-15 15:27:20
|
> 2) Does a C code need the entitled "main" function to run alone? Please, > disconsider the WinMain case There is no need to disconsider the winmain case. C Always executes the=20 main function first. In this case, the main function is the Windows OS. Windows then calls a=20 WinMain function (your program and/or others) when it allocates time for=20 it. This is considered "better" because if your program=20 stalls/crashes/infinite loops Windows can, after an allocated time period=20 take back control. Also in a multi-threaded environment some programs could= =20 be CPU hogs. This forces them to behave. This also makes it possible for a Windows program to receive messages=20 (keypress/mouse event) at any time during execution. That would be=20 difficult if not impossible in a linearly executing program. In my experience this all sounds better than it actually works but...=20 that's the theory :) ms At 05:51 PM 9/14/03, you wrote: >Bibliographic references are for school work and are better located by >yourself. > >/Per W > >On Sun, 14 Sep 2003, Andr=E9 Mac=E1rio Barros wrote: > > > Dear Users, > > > > 1) Does exist any difference in speed with C codes that use > > > > function prototypes > > main function > > function definitions > > > > or > > > > function definitions > > main function > > > > 2) Does a C code need the entitled "main" function to run alone? Please, > > disconsider the WinMain case > > > > Fellows, if possible, together with the answers, please indicate > > bibliography > > or link that contains the answers. > > > > Regards > > Andre Barros > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >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: Mark L. W. <ma...@al...> - 2003-09-15 15:12:01
|
That helps! Thanks!! Mark Subject: Re: [Dev-C++] Question regarding Dev-C++ and gdb In the project management window, there is between the project and the class browser a tab entitled debug (or something like that. If you don't see that left window click on see->class/project browser, or press Ctrl + B, ifyou haven't assigned that shortcut to another task. Mark L. Wise wrote: >Hello all! > >I recently upgraded to Dev-C++ version 4.9.8.1. > >I have been trying to debug a wxWindows application by setting a few watch >variables. In the older Dev-C++ I was able to see these variables in a >window near the bottom of my screen display. I currently cannot see these >variables anywhere. Am I missing something here? > >Thanks in advance! > >Mark > >Alpha II Service, Inc. >1312 Epworth Avenue >Reynoldsburg, Ohio 43068 >614 868-5033 (Voice) >617 812-5838 (Fax) > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ 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: Andrew & A. <a1...@fi...> - 2003-09-15 09:14:45
|
I am trying to create a dll to use with the Java JNI. I am using the g++ = gnu compiler. The command is gcc -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at = -Ic:/j2sdk1.4.1_02/include - Ic:/j2sdk1.4.1_02/include/win32 -shared app.c -o app.dll . I have got the hello world version working. I now need to add some = calls to directX. I am getting the error message 'undefined reference to = DirectDrawCreate@12'. When I had this error message before, when = compiling to app.exe, I was able to solve the problem by linking to a = file provided by Dev-C++ for the purpose - namely d3dx8d.dll. I am hoping that this file will solve the problem when creating my dll, = but I don't know how to add it to the command above. I have tried = -ld3dx8d.dll and -d3dx8d.dll, but, of course, they don't work. Please = help. Thanks in anticipation. PS I would love to be using the Dev-C++ SDK to create this dll, but I've = spent a week on that and I can't get it to work. ( If I tell it the = project is to make a dll, it does something very complicated which = appears to be nothing to do with what I am trying to acheive. ) If = anyone knows the trick I would be grateful. Andrew |
|
From: Per W. <pw...@ia...> - 2003-09-14 22:52:46
|
Bibliographic references are for school work and are better located by yourself. /Per W On Sun, 14 Sep 2003, Andr=E9 Mac=E1rio Barros wrote: > Dear Users, > > 1) Does exist any difference in speed with C codes that use > > function prototypes > main function > function definitions > > or > > function definitions > main function > > 2) Does a C code need the entitled "main" function to run alone? Please, > disconsider the WinMain case > > Fellows, if possible, together with the answers, please indicate > bibliography > or link that contains the answers. > > Regards > Andre Barros > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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: w.y. <yok...@ve...> - 2003-09-14 22:10:50
|
André Macário Barros wrote: > 1) Does exist any difference in speed with C codes that use > > function prototypes > main function > function definitions > > or > > function definitions > main function Function prototypes are for helping the compiler to compile your program. > 2) Does a C code need the entitled "main" function to run alone? Please, > disconsider the WinMain case You can always try it out by making a test program. > Fellows, if possible, together with the answers, please indicate > bibliography > or link that contains the answers. Too much work. How about you take a look in any C book instead? |
|
From: <and...@su...> - 2003-09-14 21:47:49
|
Dear Users, 1) Does exist any difference in speed with C codes that use function prototypes main function function definitions or function definitions main function 2) Does a C code need the entitled "main" function to run alone? Please, disconsider the WinMain case Fellows, if possible, together with the answers, please indicate bibliography or link that contains the answers. Regards Andre Barros |
|
From: Vale G. <val...@at...> - 2003-09-14 17:53:27
|
Ravi - > I need help on finding a visual debugger. I have already tried to install the Insight debugger and the Data Display Debugger, but I have problems with compiling them on Cygwin. I was hoping there is an easy to install program for Win98. I suggest giving Insight another chance. It works fine with Dev-C++. Retrieve the version included with the GDB debugger package available from Cygwin. (There is no compilation needed.) Be sure that you get version 20030901-1 or later. Earlier versions had some annoying bugs. You can set up a Tool in Dev-C++ to easily invoke the debugger: Program: C:\cygwin\bin\insight.exe Working Directory: C:\cygwin\bin\ Parameters: <EXENAME> Chuck |
|
From: P.D. v. Z. <pa...@my...> - 2003-09-14 13:11:10
|
It could be that reinstalling didn't fix the problem, because for some versions of Windows (the newer ones in the NT series -- 2000 / XP / etc) the configuration files are stored elsewhere, and unfortunately don't get deleted along with the uninstall. On these operating systems, it's best to hunt them down and delete them yourself (after the uninstall process)... they can be found in the "Documents and Settings\<username>" directory somewhere, I'd suggest using Search/Find to locate these. Make sure you tell it to look in hidden folders as well, because that's where these files are. -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Luigi Santillo Sent: Saturday, September 13, 2003 7:56 PM To: dev...@li... Subject: Re: [Dev-C++] Compiling problems On Fri, Sep 12, 2003 at 04:24:02PM -0400, Matthews wrote: > I recently started having problems with the compile feature of Dev-C++ > (4.9.8.0 & 4.9.8.1) I have the MinGW pack installed in C:\MinGW and > Dev-C++ should reference all programs from the /bin dir, but when I > Dev-C++ press > F9 and the compiler window pops up, it says "..." where it should say > "Compiling..." A make process starts, but doesn't do anything except > crash Windows when I try to terminate it. This all happened when I > tried to get > BorlandC++ 3.0 to work with Dev-C++, and reinstalling MinGW or Dev-C++ > won't change this problem. > > Help appreciated :D > I'm not sure if I can help. However, to begin with, could you give some detail about which actions you have taken to have Dev-C++ work with the Borland compiler? Also, look into the directory where you installed Dev-C++, there you should find (I'm speaking about 4.9.8.0 here, things shouldn't have changed within the latest beta) the two files: "DEVCPP.ini" and "devcpp.cfg", these hold some settings which are used by the IDE: what's in there? I mean, do you still have the paths stemming from "c:\borland" (I guess) or have you placed the ones pointing to Gcc? It sounds strange that reinstalling Dev-C++ hasn't fixed the problem. -- >> gisan >> ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ 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: Ravi D. <rav...@ho...> - 2003-09-14 07:14:59
|
Hello people, I am running Dev-cpp v.4 and am on a Windows 98SE system. I need help on finding a visual debugger. I have already tried to install the Insight debugger and the Data Display Debugger, but I have problems with compiling them on Cygwin. I was hoping there is an easy to install program for Win98. I would appreciate any help or links that I recieve. Thanks. _________________________________________________________________ MSN Hotmail now on your Mobile phone. http://server1.msn.co.in/sp03/mobilesms/ Click here. |
|
From: Luigi S. <gi...@li...> - 2003-09-14 06:55:18
|
On Fri, Sep 12, 2003 at 04:24:02PM -0400, Matthews wrote: > I recently started having problems with the compile feature of Dev-C++ > (4.9.8.0 & 4.9.8.1) I have the MinGW pack installed in C:\MinGW and > Dev-C++ should reference all programs from the /bin dir, but when I press > F9 and the compiler window pops up, it says "..." where it should say > "Compiling..." A make process starts, but doesn't do anything except crash > Windows when I try to terminate it. This all happened when I tried to get > BorlandC++ 3.0 to work with Dev-C++, and reinstalling MinGW or Dev-C++ > won't change this problem. > > Help appreciated :D > I'm not sure if I can help. However, to begin with, could you give some detail about which actions you have taken to have Dev-C++ work with the Borland compiler? Also, look into the directory where you installed Dev-C++, there you should find (I'm speaking about 4.9.8.0 here, things shouldn't have changed within the latest beta) the two files: "DEVCPP.ini" and "devcpp.cfg", these hold some settings which are used by the IDE: what's in there? I mean, do you still have the paths stemming from "c:\borland" (I guess) or have you placed the ones pointing to Gcc? It sounds strange that reinstalling Dev-C++ hasn't fixed the problem. -- >> gisan >> |
|
From: Alfredo C. <al...@cl...> - 2003-09-14 04:07:19
|
Hi: I'm trying to compile a project that use xbase using devc++ 5 and wxWindows 2.4.0. I'm using MingW32 with gcc 3.2. The compilation seems to fail here: #ifdef __WIN32__ #include "xbase/xbconfig.h" <<--- #else #include "xbase/xbconfig.h" #endif Inclusion of this file seems to intefere with other include files from wxWindows, independent of where I place the include files in the sources. If I remove all references to xbase, the project compiles fine. Anybody using a similar configuration that could show me the way so I can figure this out? Thank you. -- Alfredo J. Cole http://www.acyc.com http://www.clshonduras.com |
|
From: w.y. <yok...@ve...> - 2003-09-13 22:09:08
|
> Thomas FREESURF wrote: > > I am writing my first program and the compiler says "parse error" > because it doesn't recognize the "file" word. I thought it was defined > in "stdio.h". Can someone help me please ? In your program did you type "file" or did you type "FILE" ? Case is important. |
|
From: Thomas F. <tho...@fr...> - 2003-09-13 21:22:58
|
I'm sure I will be riculous when I get the answer but anyway: I am writing my first program and the compiler says "parse error" = because it doesn't recognize the "file" word. I thought it was defined = in "stdio.h". Can someone help me please ? |
|
From: Thomas F. <tho...@fr...> - 2003-09-13 21:20:12
|
I'm sure I will be riculous when I get the answer but anyway: I am writing my first program and the compiler says "parse error" = because it doesn't recognize the "file" word. I thought it was defined = in "stdio.h". Can someone help me please ? |
|
From: Matthews <dem...@uw...> - 2003-09-13 17:07:12
|
I recently started having problems with the compile feature of Dev-C++ (4.9.8.0 & 4.9.8.1) I have the MinGW pack installed in C:\MinGW and Dev-C++ should reference all programs from the /bin dir, but when I press F9 and the compiler window pops up, it says "..." where it should say "Compiling..." A make process starts, but doesn't do anything except crash Windows when I try to terminate it. This all happened when I tried to get BorlandC++ 3.0 to work with Dev-C++, and reinstalling MinGW or Dev-C++ won't change this problem. Help appreciated :D |
|
From: <ten...@ne...> - 2003-09-13 10:11:00
|
In the project management window, there is between the project and the class browser a tab entitled debug (or something like that. If you don't see that left window click on see->class/project browser, or press Ctrl + B, ifyou haven't assigned that shortcut to another task. Mark L. Wise wrote: >Hello all! > >I recently upgraded to Dev-C++ version 4.9.8.1. > >I have been trying to debug a wxWindows application by setting a few watch >variables. In the older Dev-C++ I was able to see these variables in a >window near the bottom of my screen display. I currently cannot see these >variables anywhere. Am I missing something here? > >Thanks in advance! > >Mark > >Alpha II Service, Inc. >1312 Epworth Avenue >Reynoldsburg, Ohio 43068 >614 868-5033 (Voice) >617 812-5838 (Fax) > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >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: Mark L. W. <ma...@al...> - 2003-09-11 19:20:21
|
Hello all! I recently upgraded to Dev-C++ version 4.9.8.1. I have been trying to debug a wxWindows application by setting a few watch variables. In the older Dev-C++ I was able to see these variables in a window near the bottom of my screen display. I currently cannot see these variables anywhere. Am I missing something here? Thanks in advance! Mark Alpha II Service, Inc. 1312 Epworth Avenue Reynoldsburg, Ohio 43068 614 868-5033 (Voice) 617 812-5838 (Fax) |
|
From: Mark L. W. <ma...@al...> - 2003-09-11 14:14:15
|
Hello all! I am trying to debug a wxWindows application with Dev-C++ (V4.9.8.1) I set a breakpoint, click debug and nothing happens. I try to view CPU Window and it gives an error: "Wait timeout for debug command". This "seemed" to start when I included the ODBC library calls (wxWindows) into my program. Before that it seemed to work ok. Any ideas out there? Thanks in advance for any help! Mark L. Wise Alpha II Service, Inc. 1312 Epworth Avenue Reynoldsburg, Ohio 43068 614 868-5033 (Voice) 617 812-5838 (Fax) |
|
From: <PSu...@ai...> - 2003-09-10 21:11:05
|
connection test |
|
From: Ed C. <em...@to...> - 2003-09-10 01:13:43
|
Oops... First off, my pseudo-code below was off (I just KNEW I would do that...) = - a and b should have been declared as char *a, *b, as Reid pointed out. = More importantly, in my real code, I had accidentally declared char foo[1], thinking I had declared foo[10]. No good. Sorry about that. -Ed -----Original Message----- From: Reid Thompson [mailto:rei...@at...]=20 Sent: Tuesday, September 09, 2003 8:31 PM To: Ed Cottrell Subject: Re: [Dev-C++] Weirdness with sprintf change char a and char b to char *a and char *b and see what you get. =20 Looks like you are assigning a string to a single char variable and =20 overflowing the allocated memory location. ie char a is a one char field = and you are assigning a 5 char variabel to it and thus not 'getting' and = end of string. char *a =3D "Hello", *b =3D "World"; char c[20]; Ed Cottrell wrote: > Hi - > > When I run the following code: > =20 > char a =3D "Hello", > b =3D "World", > c[20]; > sprintf(c, "%s %s", a, b); > > I expect c to contain "Hello World", but it contains "HelloWorld=20 > HelloWorld". In other words, it replaces EACH of the %s types in=20 > sprintf with a AND b. > > What's up with that? I'm doing almost exactly the same thing,=20 > elsewhere, with multiple arguments of the same type, and I'm not=20 > having problems there... Anybody who can help, I'd be much obliged! > > -Ed > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf=20 > _______________________________________________ > 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: Ed C. <em...@to...> - 2003-09-10 00:14:56
|
Hi - When I run the following code: char a = "Hello", b = "World", c[20]; sprintf(c, "%s %s", a, b); I expect c to contain "Hello World", but it contains "HelloWorld HelloWorld". In other words, it replaces EACH of the %s types in sprintf with a AND b. What's up with that? I'm doing almost exactly the same thing, elsewhere, with multiple arguments of the same type, and I'm not having problems there... Anybody who can help, I'd be much obliged! -Ed |
|
From: Per W. <pw...@ia...> - 2003-09-09 09:16:27
|
For Windows, that supports both ordinal and named exports, the advantage of ordinal export is faster linkage and harder reverse-engineering. With named exports, it is quite easy to look at a DLL and find out what services it exports - you still need to find out parameter types etc. When exporting a c++ symbol by name, the fully decorated name must be specified. The advantage is that you then get type-safe linkage even when using DLL files. Obviously, by defining the symbol as extern "C", it won't use any name mangling, so it is a lot easier to create the def file. With "C" linkage, it is also easier to interact between different compilers, since it doesn't matter if they use different name-mangling rules. However, they still have to use the same calling conventions. /Per W On Tue, 9 Sep 2003, P.D. van Zelst wrote: > Well, it's a number you can define yourself... you can give it any > arbitrary value. If it was something critical as the stack size for > example, I don't think they'd let you specify it yourself. The numbers > in the .def files (after the @ symbol) get put there by the developers > who create the DLL, not by the compiler. > And now I know the reason why you can use these numbers as well.... > here's an excerpt from a webpage I found: > > "Module definition file > In conventional systems, DLLs may export by name or by ordinal. Symbian > OS only supports exporting by ordinal. Exporting by ordinal reduces the > time taken to find the item in the DLL export table and also reduces the > size of the DLL as names need not be stored. Ordinals are used for > accessing the address of a function in the DLL export table. > > A module definition file (.def) is a text file which lists the exported > functions of a DLL; it is used in an ordinal build to insert ordinal > information into the DLL export table." > > Don't know if this holds exactly true for all .def files, since this is > from the Symbian website, but it's a start :) > > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of OROSZI > Bal=E1zs > Sent: Monday, September 08, 2003 9:47 PM > To: dev...@li... > Subject: Re: [Dev-C++] @ symbol at the end of function names? > > > P.D. van Zelst wrote: > > The @ symbol in .def files has nothing to do with name mangling, stack > > > sizes, or whatever. They're ordinal numbers you can optionally give to > > > the functions you export from the DLL. Don't know the exact use of > > those though.... never had to look it up, I just always put them in > > there out of habit :) > > Are you sure? I thought it was stack size. Somehow, I think it is stack > size, as if a funcion takes 1 int, then the number is 4, if takes 2 > ints, then the number is 8, if 3 ints, it is 12. That looks like a > pattern for sure. > > -- > Greetings, > Bal=E1zs > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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: P.D. v. Z. <pa...@my...> - 2003-09-09 07:39:52
|
Well, it's a number you can define yourself... you can give it any arbitrary value. If it was something critical as the stack size for example, I don't think they'd let you specify it yourself. The numbers in the .def files (after the @ symbol) get put there by the developers who create the DLL, not by the compiler. And now I know the reason why you can use these numbers as well.... here's an excerpt from a webpage I found: "Module definition file In conventional systems, DLLs may export by name or by ordinal. Symbian OS only supports exporting by ordinal. Exporting by ordinal reduces the time taken to find the item in the DLL export table and also reduces the size of the DLL as names need not be stored. Ordinals are used for accessing the address of a function in the DLL export table. A module definition file (.def) is a text file which lists the exported functions of a DLL; it is used in an ordinal build to insert ordinal information into the DLL export table." Don't know if this holds exactly true for all .def files, since this is from the Symbian website, but it's a start :) -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of OROSZI Bal=E1zs Sent: Monday, September 08, 2003 9:47 PM To: dev...@li... Subject: Re: [Dev-C++] @ symbol at the end of function names? P.D. van Zelst wrote: > The @ symbol in .def files has nothing to do with name mangling, stack > sizes, or whatever. They're ordinal numbers you can optionally give to > the functions you export from the DLL. Don't know the exact use of=20 > those though.... never had to look it up, I just always put them in=20 > there out of habit :) Are you sure? I thought it was stack size. Somehow, I think it is stack=20 size, as if a funcion takes 1 int, then the number is 4, if takes 2=20 ints, then the number is 8, if 3 ints, it is 12. That looks like a=20 pattern for sure. -- Greetings, Bal=E1zs ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ 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 |