dev-cpp-users Mailing List for Dev-C++ (Page 523)
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: <h.r...@gm...> - 2002-09-22 22:31:18
|
Hi List,
i tried to replace the following code:
typedef vector<double>::iterator it;
for(it i = TMW.begin(); i != TMW.end(); ++i) {
sx += *i;
sxx += sqr(*i);
} // for it
with:
sx = accumulate(TMW.begin(), TMW.end(), 0.0);
sxx = accumulate(TMW.begin(), TMW.end(), 0.0, sqr);
sqr (same for both versions):
namespace hr_math {
template<class T>
inline T sqr(T x) { return x * x; }
}
sx and sxx are double.
If i compile it i get the error messages:
71 E:\dev\dev-c++\proj2\procabi.cpp
no matching function for call to `accumulate(
What is wrong with my code ? Similar code can be found in several books.
Thanks for your help
greetings
Horst
--
Horst Rößner
Postf. 1802
52205 Stolberg
ICQ ID #74808448
h.r...@gm...
h.g...@t-...
Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX wählen -
und tolle Preise absahnen! http://www.onlinestar.de
|
|
From: Napoleon A. <nah...@so...> - 2002-09-22 19:15:09
|
Hi, I get this error message quite a lot especially when I open a huge file = of about 2000 lines . The error is "list index out of bounds (4596)". May be the creator can have a look at it. Napoleon. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.389 / Virus Database: 220 - Release Date: 16/09/2002 |
|
From: Luigi S. <gi...@li...> - 2002-09-22 05:23:35
|
At 11.01 09/20/02 +0200, Marc Heiligers <ma...@e-...> wrote: >... >Serves me right for trying to be Microsoft Centric. >Any idea about Resources and Make Files tutorials? Hello Marc about "make": a starting point could be GNU "make" manual, you find it on http://www.delorie.com/gnu/docs/make/make_toc.html Hope you'll become "GNU centric" :) gisan |
|
From: Abhijit S. <mu...@gm...> - 2002-09-21 17:24:45
|
> Browsing winuser.h shows up that RC_INVOKED must be defined to get the
winuser.h file to be
> included.
>
> Defining it at the top of the sourcecode gives me a huge number of compile
errors...
>
> Can you explain this ?
I'm not really sure, but I think RC_INVOKED is automatically #define'd by
the compiler when it's calling from a resource file, to block-out parts of
the code inapplicable to it (like function prototypes, etc.). Try
#ifdef RC_INVOKED
#error some message
#endif
in a header, and include it *only* in a resource file and then only in a
code file. It should error only when included from the rc.
___________________________________________________________
Abhijit Shylanath
E-mail: mu...@gm... || ibr...@bi...
Web-site: http://mudeth.tripod.com/
|
|
From: <thj...@ya...> - 2002-09-20 17:15:29
|
Hi List,
I just started using the SDL lib and tried to use
SMPEG for playing Videos. But I don't get the lib
running under Mingw/DevC++ 4. Has anyone a working
version or is it just my stupidness that keep me from
using it.
Thanks for any constructive answers and sorry my
English ?hm?
Mark
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de
|
|
From: Abhijit S. <mu...@gm...> - 2002-09-20 16:19:45
|
> >I just don't understand > >why I had to replace IDC_STATIC with -1? > > Well, that's because from Windres' view, IDC_STATIC is unknown and is considered as a label > which must be defined in the include file corresponding with the resource one. > Actually, it's defined in <winuser.h>, so you can use it if you've #include'd <windows.h>, but it is worth knowing that it's -1. ___________________________________________________________ Abhijit Shylanath E-mail: mu...@gm... || ibr...@bi... Web-site: http://mudeth.tripod.com/ |
|
From: metalseb <met...@fr...> - 2002-09-20 13:53:28
|
Hi Djura >I just tried your advice and it works. Glad to see it's ok now. >I just don't understand >why I had to replace IDC_STATIC with -1? Well, that's because from Windres' view, IDC_STATIC is unknown and is considered as a label which must be defined in the include file corresponding with the resource one. Like this : #define IDC_STATIC 2000 or everything else. But when I design a GUI, each time I know a static element won't be used by the program, I set its ID to -1. >anybody know if there is some kind of manual on DevC++ or Win32 >API(except MSDN)? Well, there is an online manual for DevC++ on bloodhed's site I think. Regarding Win32 API, I suggest you to buy the MS SDK CDROM online on MSDN. It costs USD 17 for anybody which lives in Europe and it is a *must buy* for anybody who wants to develop anything on Win platforms. This CD is worth hundreds of Euros in programming books, if you can find any nowadays on plain Win32 API programming, so sad.... But if you need a good start, just check out Forger's tutorial (Grab the URL using Google, haven't got it on this computer now) and find the basic "win32.hlp" file anywhere else. Kind regards -- Seb |
|
From: Vlada D. <dj...@im...> - 2002-09-20 10:20:17
|
Hi,metalseb I just tried your advice and it works. Thanks! I just don't understand why I had to replace IDC_STATIC with -1? And another question: does anybody know if there is some kind of manual on DevC++ or Win32 API(except MSDN)? Regards, Djura -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of metalseb Sent: cetvrtak, 19. septembar 2002 19:02 To: Vlada Djurovic; devcpp mailing list Subject: RE: [Dev-C++] DialogBox returns -1 Good evening Djura Hummm, just tried your code and it works without any problem here... Did you try to compile by a "make clean" (CTRL-F11) to get sure that all files, including resources were parsed and compiled together ? Just replaced the IDC_STATIC flag by -1 of the groupbox and the ctext because Windres showed me a parse error with this in my 4.9.4.1 package. Forget what I said regarding the return value of DialogBox. In the chunk of code you showed this afternoon, there was no way of knowing you were sending the ID of the pressed button as return var from the EndDialog call.... Sorry for any misunderstanding ! If you have any further questions, feel free to email me Kind regards -- Seb ------------------------------------------------------- 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://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Marc H. <ma...@e-...> - 2002-09-20 08:58:37
|
Thanks Per. That does indeed solve the problem. Serves me right for trying to be Microsoft Centric. Evil evil evil stoopid. Any idea about Resources and Make Files tutorials? _____________________________ Marc Heiligers -----Original Message----- From: Per Westermark [mailto:pw...@ia...] Sent: 20 September 2002 10:33 AM To: Marc Heiligers Cc: dev-cpp-users-list Subject: Re: [Dev-C++] make error Try and stay away from directories with a space in them, and see if that solves your problem. /Per W On Fri, 20 Sep 2002, Marc Heiligers wrote: > Hi All, > > I've just downloaded and installed Dev-C++. Looks very cool, but when > I try to comile and execute I get: > > Building Makefile: "C:\Program > Files\Dev-Cpp\Examples\WinMenu\Makefile.win" > Executing make... > make.exe -f "C:\Program Files\Dev-Cpp\Examples\WinMenu\Makefile.win" all > Execution terminated > > on the comile log tab and > > 2 C:\Program Files\Dev-Cpp\Examples\WinMenu\2 > unable to run program file. > > on the compile tab. > > I ran the make utility from the command line (exactly as Dev-C++ was > trying > to) and received a > > make.exe: *** No rule to make target `main.cpp', needed by `main.o'. > Stop. > > error. Now, being used to using VC++ I no very little about make files > and such like. Can anybody help me out, and can anybody send me links > to some decent tutorials about make files (and resource files too). > > Thanks. > > _____________________________ > Marc Heiligers > |
|
From: Per W. <pw...@ia...> - 2002-09-20 08:33:25
|
Try and stay away from directories with a space in them, and see if that solves your problem. /Per W On Fri, 20 Sep 2002, Marc Heiligers wrote: > Hi All, > > I've just downloaded and installed Dev-C++. Looks very cool, but when I try > to comile and execute I get: > > Building Makefile: "C:\Program Files\Dev-Cpp\Examples\WinMenu\Makefile.win" > Executing make... > make.exe -f "C:\Program Files\Dev-Cpp\Examples\WinMenu\Makefile.win" all > Execution terminated > > on the comile log tab and > > 2 C:\Program Files\Dev-Cpp\Examples\WinMenu\2 > unable to run program file. > > on the compile tab. > > I ran the make utility from the command line (exactly as Dev-C++ was trying > to) and received a > > make.exe: *** No rule to make target `main.cpp', needed by `main.o'. Stop. > > error. Now, being used to using VC++ I no very little about make files and > such like. Can anybody help me out, and can anybody send me links to some > decent tutorials about make files (and resource files too). > > Thanks. > > _____________________________ > Marc Heiligers > |
|
From: Marc H. <ma...@e-...> - 2002-09-20 08:08:20
|
Hi All, I've just downloaded and installed Dev-C++. Looks very cool, but when I try to comile and execute I get: Building Makefile: "C:\Program Files\Dev-Cpp\Examples\WinMenu\Makefile.win" Executing make... make.exe -f "C:\Program Files\Dev-Cpp\Examples\WinMenu\Makefile.win" all Execution terminated on the comile log tab and 2 C:\Program Files\Dev-Cpp\Examples\WinMenu\2 unable to run program file. on the compile tab. I ran the make utility from the command line (exactly as Dev-C++ was trying to) and received a make.exe: *** No rule to make target `main.cpp', needed by `main.o'. Stop. error. Now, being used to using VC++ I no very little about make files and such like. Can anybody help me out, and can anybody send me links to some decent tutorials about make files (and resource files too). Thanks. _____________________________ Marc Heiligers |
|
From: metalseb <met...@fr...> - 2002-09-19 17:01:00
|
Good evening Djura Hummm, just tried your code and it works without any problem here... Did you try to compile by a "make clean" (CTRL-F11) to get sure that all files, including resources were parsed and compiled together ? Just replaced the IDC_STATIC flag by -1 of the groupbox and the ctext because Windres showed me a parse error with this in my 4.9.4.1 package. Forget what I said regarding the return value of DialogBox. In the chunk of code you showed this afternoon, there was no way of knowing you were sending the ID of the pressed button as return var from the EndDialog call.... Sorry for any misunderstanding ! If you have any further questions, feel free to email me Kind regards -- Seb |
|
From: metalseb <met...@fr...> - 2002-09-19 17:00:10
|
Good evening Djura Hummm, just tried your code and it works without any problem here... Did you try to compile by a "make clean" (CTRL-F11) to get sure that all files, including resources were parsed and compiled together ? Just replaced the IDC_STATIC flag by -1 of the groupbox and the ctext because Windres showed me a parse error with this in my 4.9.4.1 package. Forget what I said regarding the return value of DialogBox. In the chunk of code you showed this afternoon, there was no way of knowing you were sending the ID of the pressed button as return var from the EndDialog call.... Sorry for any misunderstanding ! If you have any further questions, feel free to email me Kind regards -- Seb |
|
From: Abhijit S. <mu...@gm...> - 2002-09-19 16:27:13
|
> > Hello, > > think Abhijit Shylanath mistyped his response - should be (untested too) : > Yes, he did. Dumb guy. Serves him right for mixing up ambiguity. ... > Before ending, a little warning : if you want to execute system commands in > a multi-threaded program, you MUSN'T use the system() function. You must > then use a combination of fork() and for example waitpid() commands. > If you need a sample, query on the list. This is, unfortunately, platform-dependant, and on Windows, you should use CreateProcess(). Same last sentence. ___________________________________________________________ Abhijit Shylanath E-mail: mu...@gm... || ibr...@bi... Web-site: http://mudeth.tripod.com/ |
|
From: Christian W. <Chr...@vo...> - 2002-09-19 15:30:19
|
Hi List, does someone has already played with syntaxhighlightning (like M$ Visual Studio), and the Listfiled (if you press ctrl+space) ??? And does someone have some example code ???? Kind r Chris |
|
From: Christophe C. <chr...@fr...> - 2002-09-19 14:12:46
|
This sample (chunck only) try to copy a file using 'cp' command, and is
thread-safe.
At my knowledge, should run on any Un*x system.
The idea is :
- create a second process using fork() - this function copy the
current process in a new one. Both processes are then continued from this
point. In the parent process, the return value is the child PID, in the
child it is 0.
- in the parent process, wait for termination of the child process
(using waitpid()), to synchronize both processes like with a system() call.
- in the child process, create the command line (command +
parameters) to be executed, and use execve() (or other exec* function) to
replace itself (the code of current process) by the command's code.
#include <unistd.h> /* For fork() and execvp() */
#include <sys/types.h> /* For pid_t */
#include <sys/wait.h> /* For waitpid() */
pid_t PID; /* The child PID */
int RC=0; /* The command return code */
...
...
...
PID=fork(); /* Create a new process */
if (PID) /* Executed when in the parent process, PID !
= 0 */
{
waitpid(PID,&RC,0); /* Wait for termination of the child process
and get its return code */
if (RC>>8) /* Test the return code - many values can be
tested - here, I test only wether it is 0 or not */
{
fprintf(stderr,"Error copying file - cp return code [%d]\n",RC>>8);
exit(EXIT_FAILURE);
}
else
printf"File copied !\n");
}
else /* Executed when in the child process, PID == 0 */
{
char **SysParams=new char *[4]; /* This array will contain the
name of the command, with parameters, terminated by a NULL pointer. This
will be the argv[] array of the called command */
SysParams[0]="cp"; /* Command */
SysParams[1]=InFileName; /* First param - must be a char *
*/
SysParams[2]=OutFileName; /* Second param - must be a char
* */
SysParams[3]=NULL; /* Terminator */
if (execvp(SysParams[0],SysParams)==-1) /* Replace itself with the
SysParams[0] program, called with SysParams as argv[]
Once exexvp() is started, the
original process is destroyed - it never continues after that point. The
only exception is if execvp() fails (for example if the command can't be
executed).
In this case, we process the
error... I think there are some methods to have a "nice" description of the
error (maybe perror() with errno ?) but I don't know them. */
{
fprintf(stderr,"Error in execvp for copying file !\n");
exit(EXIT_FAILURE);
}
}
...
...
Good luck in multi-threaded programming !
Christophe
|
|
From: Vlada D. <dj...@im...> - 2002-09-19 13:42:26
|
Hi, metalseb Thanks for your inerest in this thing. The code is in the attachment. -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of metalseb Sent: cetvrtak, 19. septembar 2002 12:59 To: Vlada Djurovic; devcpp mailing list Subject: Re: [Dev-C++] DialogBox returns -1 Hi Vlada You should check out which button was pressed pressed inside the "about" dialog box in its own message loop processing. Reading the Win32 API doc, DialogBox does not return the value of the button you pressed but the value returned by the EndDialog API call inside the message loop You also say that ret is equal to -1. It indicates that the DialogBox failed. That's why it doesn't display anything. If you want, just send me your full code, I will check and post an explanation here just after. Kind regards -- Seb ------------------------------------------------------- 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://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: metalseb <met...@fr...> - 2002-09-19 10:59:46
|
Hi there Reading the SDK doc about the ListView_GetStringWidth macro, I can see that the return value does not care about the "padding". Quote from the doc : "To retrieve the column width that can contain the string without truncating it, you must add padding to the returned string width." Ok, now, how can I retrieve this padding value ? My searches thru Google groups didn't showed me anything of interest about this. Anybody could help ? -- Seb |
|
From: metalseb <met...@fr...> - 2002-09-19 10:56:51
|
Hi Vlada You should check out which button was pressed pressed inside the "about" dialog box in its own message loop processing. Reading the Win32 API doc, DialogBox does not return the value of the button you pressed but the value returned by the EndDialog API call inside the message loop You also say that ret is equal to -1. It indicates that the DialogBox failed. That's why it doesn't display anything. If you want, just send me your full code, I will check and post an explanation here just after. Kind regards -- Seb |
|
From: Vlada D. <dj...@im...> - 2002-09-19 10:06:26
|
Hi, everybody.
Here=92s another (dum) question from me: I wrote a simple program which
should display a dialog box when I push the menu button, but when I do
that, the dialog doesn=92t display. Judging from my code, DialogBox
function returns -1. What could be the cause of this? Here=92s a piece =
of
code:
=20
case WM_COMMAND:
switch(LOWORD(wParam))
{
case ID_HELP_ABOUT: //menu item
int
ret=3DDialogBox(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_ABOUTDLG),hwnd,=
A
boutDlgProc);
if(ret=3D=3DIDOK)
MessageBox(hwnd,"Dialog
OK","Success",MB_OK|MB_ICONINFORMATION);
else if(ret=3D=3DIDCANCEL)
MessageBox(hwnd,"Dialog
cancel","Success",MB_OK|MB_ICONINFORMATION);
else if(ret=3D=3D-1)
MessageBox(hwnd,"Dialog
Fail!","Error",MB_OK|MB_ICONSTOP);
break;
}
break;
|
|
From: Bob W. <bo...@af...> - 2002-09-19 07:52:44
|
Can anyone give an example of this? Christophe Chailloleau wrote: >--clip-- > >Before ending, a little warning : if you want to execute system commands in >a multi-threaded program, you MUSN'T use the system() function. You must >then use a combination of fork() and for example waitpid() commands. >If you need a sample, query on the list. > >--clip== > -- -- Bob ' Sally:"So a man can be friends with a woman he finds unattractive?" Harry:"No, you pretty much want to nail them, too" ' ICQ: 77149742 AOL: Sanchrin MSN: Bo...@af... http://www.aftermath.cx/ |
|
From: Christophe C. <chr...@fr...> - 2002-09-19 07:32:52
|
Hello,
think Abhijit Shylanath mistyped his response - should be (untested too) :
string whatever = "foo";
system(whatever.c_str());
This will execute the command "foo" on your system.
Little tip : system() returns an integer value, but on many systems, this
is not the plain return code of the executed command. If you need to test
the command's return code, use (will work on many - but maybe not all -
systems) :
int returncode=system(whatever.c_str()) >> 8;
This is because on these systems, the return code of the command is stored
in the 8 upper bits of a 16 bits integer. The ">> 8" says "take all the
bits of this integer and shift them 8 times on right". Thus, the 8 upper
bits takes place of the 8 lower ones, and the value of the whole integer
becames now the command's return code.
Example :
0011001100011100 >> 8 = 0000000000110011
Before ending, a little warning : if you want to execute system commands in
a multi-threaded program, you MUSN'T use the system() function. You must
then use a combination of fork() and for example waitpid() commands.
If you need a sample, query on the list.
|
|
From: Christian W. <Chr...@vo...> - 2002-09-19 06:29:32
|
Argh, brain lock ...... I've seen it to late ;-) -----Urspr=FCngliche Nachricht----- Von: Stringer, Adrian [mailto:Adr...@as...] Gesendet am: Mittwoch, 18. September 2002 17:19 An: 'dev...@li...' Betreff: RE: [Dev-C++] execution of a string with system() --- #include "stdio.h" #include "string.h" #include "stdlib.h" --- I may be wrong here, and if so feel free to slap me, but I think that = ought to be #include <cstdio> #include <cstring> #include <cstdlib> and your own header files should be included as #include "myheader.h" Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Per W. <pw...@ia...> - 2002-09-19 02:08:20
|
Yes, fgets(buf,sizeof(buf),stdin) works ok to read from stdin. /Per W On Wed, 18 Sep 2002, Carlos Garc=EDa del Monte wrote: >=20 >=20 > Per Westermark escribi=F3: >=20 > > Forst of all, I didn't know that overload existed in C. >=20 > Sorry, my english is not perfect, I got the "license" of saying overload,= I noticed it > would be best not having it after sending. Er, today is my dumb day, it s= eems >=20 > > > > > > Second. Why write a new getline with - almost - the same function as > > the already existing fgets? >=20 > I have the cpluplus reference, and by it and the name fgets is for workin= g for files (I > should have add it) but I assumed the question was about stdin. >=20 > > > > > > Third. The sample code never terminates the loaded buffer after it find= s z > > newline character, or runs out of buffer space. >=20 > Ouch! I had the feeling of forgetting something. > buffer[size] =3D '\0'; > It shouldn't run out of buffer, the parameter is given. (well, size =3D l= ast non \0 index > +1) >=20 > (I didn't test it) >=20 > > > > I was trying to use the "getline()" function in the GCC/GNU distro = as included > > > > in Dev-Cpp v5 beta. > > > > > > > > I was getting an error from the linker. > > > > > > > > I looked into the <iostream.h>. > > > > > > > > This appears to be a C++ header. > > > > > > > > I am developing/compiling as 'C'. > > > > > > > > I tried it anyway. > > > > > > > > compile errors. to be expected. > > > > > > > > The GCC docs seem to imply that this is a <stdio.h> function that c= an be used > > > > from 'C' code ? > > > > > > > > ??? > > > > > > > > TIA, > > > > Tony > > > > > > > > --- Carlos Garc=EDa del Monte <cg...@wo...> wrote: > > > > > #include <iostream.h> > > > > > > > > =3D=3D=3D=3D=3D > > > > > > > > ------------------------------------------------------- > > > > This SF.NET email is sponsored by: AMD - Your access to the experts > > > > on Hammer Technology! Open Source & Linux Developers, register now > > > > for the AMD Developer Symposium. Code: EX8664 > > > > http://www.developwithamd.com/developerlab > > > > _______________________________________________ > > > > Dev-cpp-users mailing list > > > > Dev...@li... > > > > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.NET email is sponsored by: AMD - Your access to the experts > > > on Hammer Technology! Open Source & Linux Developers, register now > > > for the AMD Developer Symposium. Code: EX8664 > > > http://www.developwithamd.com/developerlab > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.NET email is sponsored by: AMD - Your access to the experts > on Hammer Technology! Open Source & Linux Developers, register now > for the AMD Developer Symposium. Code: EX8664 > http://www.developwithamd.com/developerlab > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >=20 |
|
From: Abhijit S. <mu...@gm...> - 2002-09-18 16:46:08
|
> Second. Why write a new getline with - almost - the same function as > the already existing fgets? I have the cpluplus reference, and by it and the name fgets is for working for files (I should have add it) but I assumed the question was about stdin. stdin is also a file. The console is a file (named `con'), everything is a file. Hell, in Unix, Count Dracula is a file. ___________________________________________________________ Abhijit Shylanath E-mail: mu...@gm... || ibr...@bi... Web-site: http://mudeth.tripod.com/ |