dev-cpp-users Mailing List for Dev-C++ (Page 208)
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: Ewald H. <in...@ho...> - 2004-06-17 23:17:47
|
>An interesting article on the API: >http://www.joelonsoftware.com/articles/APIWar.html >Kind of off topic but a good read. Not really off-topic, considering that our problem IS the fact that = everyone's using these wonderfull tools (window libraries) without = really understanding what's driving them. We are trying to port some old = DOS applications to Windows, and it's turning into a real nightmare. = Even file-sharing across networks was easier in DOS, just look at = Clipper and DBase III applications. It's a pity we have removed ourselves so far from the API that finding = any real, practical knowledge about it is very hard indeed. Thank you for the interesting read. Regards Ewald Horn Proprietor/Eienaar : Horn Labs Cell/Sel : 083 519 1615 Website : http://www.hornlabs.co.za Email/E-pos : in...@ho... |
|
From: Neszt T. <ne...@ss...> - 2004-06-17 20:50:28
|
> Is there a better way to do this? Im not supposed to use an array for
> this assignment
Why?
I suggest this trivial soluton:
int die[6];
void rollDice() {
int i;
for (i=0 ; i<6 ; i++) {
die[i] = i+1;
}
}
Regards,
Neszt Tibor
|
|
From: Dane E. <DE...@pa...> - 2004-06-17 20:17:06
|
Hi all,
Thanks in advance for any help you can offer me.
=20
I have a newbie question. I need to roll six dice using a rollDice();
function
In the function I need to use a for loop to increment through my six
dice variables that I set as global variables as:
die1, ..., die6. I cant figure out how to append the value of my
for-loop variable to the name of my "die" variable, so I can set it?=20
Is there a better way to do this? Im not supposed to use an array for
this assignment, but I am supposed to use=20
a loop. Here is what I have done so far:
=20
int die1, die2, die3, die4, die5, die6; //global variables
=20
//my broken function so far
void rollDice()
{
int i;
for( i =3D 1; i =3D 6; i++)
{
"die"+i =3D i; // I know this is wrong, but I wrote it this way =
to
illustrate my problem. ;-)
}
}
|
|
From: Scott S. <age...@co...> - 2004-06-17 16:07:33
|
An interesting article on the API: http://www.joelonsoftware.com/articles/APIWar.html Kind of off topic but a good read. Ewald Horn wrote: > > DO you mean stuff like WxWindows? > > Nope, I want to use the Windows API. It turns out I can modify DFM2API > to suit my needs. Thanks though. > > Regards > Ewald Horn > Proprietor/Eienaar : Horn Labs > Cell/Sel : 083 519 1615 > Website : http://www.hornlabs.co.za > Email/E-pos : in...@ho... <mailto:in...@ho...> |
|
From: <per...@ya...> - 2004-06-17 14:49:25
|
Sometimes, I close a project and then create a new project.When I create a new .c file and compile it.A dialog box pop up sayed"Coun't not create makefile!".Like this problem is appear only in some time not every time.If I close the Dev-Cpp, and then I open it again,the project which I have just created now can be compile ok.Why have this problem in Dev-Cpp?Is it the bug of the software or my fault operation? --------------------------------- Do You Yahoo!? 嫌邮箱太小?雅虎电邮自助扩容! |
|
From: A. K. <kli...@ad...> - 2004-06-16 23:43:42
|
Peter Boehm wrote: > wer...@zf... wrote: > > > You can add any help file to the devc++ help menu. See help menu-items. > > So, if you have a Borland help file just add it. Not realy true. just try and add the latest pSDK... Alex |
|
From: Paul I. <pi...@ot...> - 2004-06-16 18:46:20
|
> http://www.wrox.com/dynamic/books/download.aspx >=20 > get the examples for Beginning Linux Programming, 2nd Edition. Chapter = 12: Hrrm... 3nd Edition. |
|
From: Paul I. <pi...@ot...> - 2004-06-16 17:57:10
|
Quoting Koval Valery <vk...@in...>: > Hi! >=20 > If anybody have small example for work with threads through glibc pleas= e > send me. I'm search example with thread class as c++ class. >=20 > Thanks. http://www.wrox.com/dynamic/books/download.aspx get the examples for Beginning Linux Programming, 2nd Edition. Chapter 12= : Posix threads. |
|
From: Peter B. <pb...@hg...> - 2004-06-16 15:12:28
|
wer...@zf... wrote: > Hi, > > I was successful installing the GLibCHelp.DevPak. Thank you, Peter Boehm. > > Is there a similar Help Package for the C++ stream classes and for the STL, which can be added to the > help menu ? You can add any help file to the devc++ help menu. See help menu-items. So, if you have a Borland help file just add it. Peter |
|
From: Koval V. <vk...@in...> - 2004-06-16 12:50:05
|
On Wed, 16 Jun 2004 08:29:58 -0400 David McKen <dml...@co...> wrote: > Which API do you want to learn? Win32 or POSIX? > > > Koval Valery wrote: > > >Hi! > > > >If anybody have small example for work with threads through glibc > >please send me. I'm search example with thread class as c++ class. I want POSIX API. This may be any library (likely class) based on POSIX threads (like pthread). |
|
From: David M. <dml...@co...> - 2004-06-16 12:36:58
|
Which API do you want to learn? Win32 or POSIX? Koval Valery wrote: >Hi! > >If anybody have small example for work with threads through glibc please >send me. I'm search example with thread class as c++ class. > >Thanks. > > > >------------------------------------------------------- >This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference >Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer >Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA >REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND >_______________________________________________ >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: <wer...@zf...> - 2004-06-16 12:08:59
|
Hi, I was successful installing the GLibCHelp.DevPak. Thank you, Peter = Boehm. Is there a similar Help Package for the C++ stream classes and for the = STL, which can be added to the help menu ? Mit freundlichen Gr=FC=DFen / Best regards Werner Sticht mailto:wer...@sa... Tel. (+49) [0] 9721/98-2595 |
|
From: Peter B. <pb...@hg...> - 2004-06-16 09:52:37
|
wer...@zf... wrote: > Hi, > > on some other compilers (eg. Borland 3.1 or lccwin32) I can position the cursor in a word (eg. printf ) in my program. > When I press F1 I get a description of the library function. > Is this feature als available with devcpp ? > > I tried to download http://bloodshed.ygto.com/dev/packages/bin/GlibcHelp.DevPak which might be such a help, > but my browser ended with timeout. > Try http://public.planetmirror.com/pub/devcpp/GLibCHelp.DevPak Peter |
|
From: <wer...@zf...> - 2004-06-16 06:07:14
|
Hi, I cound compile my programs with the new version. But when I tried to start one with debug, I only get a blue screen. In this blue screen I am asked to reboot or to continue pressing a key. When I press the key, I get an endless lot of messages from kernel32.dll that an excepton occured. I only could stop that by a = reboot. Consequence : If you accidentially entered debug, you have to reboot. Is there a remedy ? Mit freundlichen Gr=FC=DFen / Best regards Werner Sticht mailto:wer...@sa... Tel. (+49) [0] 9721/98-2595 |
|
From: Koval V. <vk...@in...> - 2004-06-16 05:13:34
|
Hi! If anybody have small example for work with threads through glibc please send me. I'm search example with thread class as c++ class. Thanks. |
|
From: Ewald H. <in...@ho...> - 2004-06-16 03:33:35
|
Hi, just before I go an reinvent the wheel (again), does anyone know of a = form designer, like in C++ Builder or Delphi for C++? I'm not talking = about a dialog designer, I am talking about a designer for your main = window that is not resource based ? I just love the way Delphi allows = you to design your main window. Even if it's a commercial tool, I think it would be excellent to have = something like that, especially to quickly generate prototype = applications. Either that or something that will convert Delphi *.dfm = files to C or C++ code. I have checked out the DFM2API project and am investigating expanding it = to suit my needs. Anyone know of anything else out there ? Thank you Ewald Horn Proprietor/Eienaar : Horn Labs Cell/Sel : 083 519 1615 Website : http://www.hornlabs.co.za Email/E-pos : in...@ho... |
|
From: Paul I. <pi...@ot...> - 2004-06-15 19:23:40
|
Quoting Bruce jjs <per...@ya...>:
> I have write a very simple program to test the pointer.The progr=
am is
> list belove:
> /* **************************************** */
> #include <stdio.h>
> =20
> int *p;
> =20
> =20
> void Func(void)
> {
> int number;
> =20
> number =3D 11;
> p =3D &number;
> }
> =20
> main()
> {
> Func();
> printf("*p =3D %d\n", *p);
> }
> /* ***************************** */
> The result is :
> *p =3D 11
> The variable "number" is local variable that will be destoryed af=
ter
> leave the Func( ) and the pointer "p" is pointer to it.Although p is gl=
obal
> variable,it pointer to a deleted area. To my way of thinking,*p should =
be a
> ignorance value.Is my understand wrong?
> Thanks,
> Bruce.J
>=20
What do you mean by "*p should be a ignorance value"?
This is what the compiler makes out of Func():
__Z4Funcv:
LFB1:
pushl %ebp ; Stores ebp on the stack
LCFI0:
movl %esp, %ebp ; copies the stack pointer (esp) to ebp
LCFI1:
subl $4, %esp ; esp =3D esp - 4 : This makes room for the=20
; 'number' variable on the stack (since the stack
; is growing towards lower addresses, 'number' won't
; be overwritten when pushing further data on the stack)
LCFI2:
movl $11, -4(%ebp) ; the 'number' variable is initialized to 11
; intel syntax is probably clearer: mov [DWORD PTR ebp - 4], 11
; (move the value 11 to the address pointed to by
; (ebp + 4) )
; (automatic variables are always accessed via ebp, which=20
; is the reason it is initialized to esp at the beginning of=20
; the function. (esp may change during the execution of=20
; the function body)
leal -4(%ebp), %eax ; lea : load effective address
; this intruction loads the address of the 'number' variable
; to register eax. (as can be seen, 'number' hasn't moved...)
movl %eax, _p ; the address of 'number' is stored in the variable p
; (renamed to _p by the compiler). p is actually an address:
; .bss
; .align 4
; _p:
; .space 4
; meaning that 4 bytes of space is reserved "in the .bss section"
leave ; performs cleanup:
; esp=3Debp, pop ebp=20
; this restores the stack pointer (to the point when it was=20
; stored in ebp) and then ebp is restored.
ret ; return from function
As can be seen, no area is "deleted". Nor is anything cleared (that would=
cost
time). Next time a function is called, the memory area that p points to i=
s
likely to change. As in this case:
#include <stdio.h>
=20
int *p;
=20
=20
void Func(void)
{
int number;
=20
number =3D 11;
p =3D &number;
}
void Func2(void)
{
int a;
=09
a=3D 5;
} =20
=20
main()
{
Func();
printf("*p =3D %d\n", *p);
Func2();
printf("*p =3D %d\n", *p);
=20
}
When Func2 is called the variable 'a' will be assigned the same address t=
hat
'number' occupied...
Hope this helps ;-)
|
|
From: Paul I. <pi...@ot...> - 2004-06-15 17:43:42
|
Quoting Bruce jjs <per...@ya...>:
> I have used inportb( ) and outportb( ) write a serial communication=
'
> program.But this two functions is provided by Borland C 3.1 and they ar=
e not
> standard C functions.Does ANSI C has some functions can do the similar =
jobs
> like inportb( ) and outportb( )?In my impression,the standard C doesn't
> support functions to direct operate hardware,isn't it?
>=20
>=20
>=20
> ---------------------------------
> Do You Yahoo!?
> =CF=D3=D3=CA=CF=E4=CC=AB=D0=A1=A3=BF=D1=C5=BB=A2=B5=E7=D3=CA=D7=D4=D6=FA=
=C0=A9=C8=DD=A3=A1
If you talking about Win32, then you should look at the CreateFile,
GetCommState, SetCommState, ReadFile and WriteFile API-functions (unless=
you'd
rather use some toolkit such as wxWidgets (?)).
You may want to explore OVERLAPPED and such to get a more efficient solut=
ion
than using timers as I did (Never succeded in getting that to work... :-/=
=20
This code works for me (with Borland Builder 5). (Pardon the mess ;-):
int TForm1::COMInit(void)
{
if (hCom) {CloseHandle(hCom); hCom =3D 0;}
hCom =3D 0;
int fSuccess;
ErrorForm =3D new TErrorForm(this);
SECURITY_ATTRIBUTES sa;
sa.nLength =3D sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle =3D true;
sa.lpSecurityDescriptor =3D NULL;
hCom =3D CreateFile("COM1", // FileName
GENERIC_READ | GENERIC_WRITE, // Des.Access
0, // ShareMode
&sa, // lpSecurityAttr
OPEN_EXISTING, // dwCreationDistribution
0, //FILE_FLAG_OVERLAPPED, // dwFlagsAndAttributes
NULL ); // hTemplateFile
if (hCom =3D=3D INVALID_HANDLE_VALUE)
{
AnsiString Text =3D "Could not open the COM-port";
ErrorForm->FelBesk->Caption =3D Text;
ErrorForm->ShowModal();
if (hCom) {CloseHandle(hCom); hCom =3D 0;}
return 1;
}
DCB dcb;
fSuccess =3D GetCommState(hCom,&dcb);
if (fSuccess =3D=3D 0)
{
AnsiString Text =3D "Could not get com-state";
ErrorForm->FelBesk->Caption =3D Text;
ErrorForm->ShowModal();
if (hCom) {CloseHandle(hCom); hCom =3D 0;}
return 2;
}
dcb.BaudRate =3D 9600;
dcb.fParity =3D FALSE;
dcb.fRtsControl =3D RTS_CONTROL_HANDSHAKE;// 2; // RTS_CONTROL_ENABLE;=
2!!// ?
dcb.ByteSize =3D 8;
dcb.StopBits =3D ONESTOPBIT;
dcb.fAbortOnError =3D TRUE; //0; // 1
dcb.fOutX =3D 0;
dcb.fInX =3D 0;
dcb.fErrorChar =3D 0;
dcb.fNull =3D 0;
dcb.fAbortOnError =3D FALSE; // TRUE (kr=E4ver hantering)
dcb.fOutxCtsFlow =3D TRUE; //0; // 1
dcb.fOutxDsrFlow =3D 0;
dcb.fDtrControl =3D DTR_CONTROL_ENABLE;
dcb.fDsrSensitivity =3D 0;
dcb.fTXContinueOnXoff =3D 1;
dcb.fOutxCtsFlow =3D 0;//1; // 1 lagsamt utan HW
dcb.fBinary =3D 1;
dcb.XonLim =3D 2048;
dcb.XoffLim =3D 512;
dcb.XonChar =3D '\x11'; // Tx and Rx XON character
dcb.XoffChar =3D '\x13'; // Tx and Rx XOFF character
dcb.ErrorChar =3D '\0'; // error replacement character
dcb.EofChar =3D'\0'; // end of input character
dcb.EvtChar =3D '\0'; // received event character
dcb.Parity =3D 0;
// dcb.wReserved =3D 0;
// dcb.fDummy2 =3D 0;
// dcb.wReserved1 =3D 0;
dcb.DCBlength; // sizeof(DCB) 28
dcb.BaudRate; // current baud rate 9600
dcb.fBinary; // binary mode, no EOF check 1
dcb.fParity; // enable parity checking 0
dcb.fOutxCtsFlow; // CTS output flow control 0
dcb.fOutxDsrFlow; // DSR output flow control 0
dcb.fDtrControl; // DTR flow control type 1
dcb.fDsrSensitivity; // DSR sensitivity 0
dcb.fTXContinueOnXoff; // XOFF continues Tx 1
dcb.fOutX; // XON/XOFF out flow control 0
dcb.fInX; // XON/XOFF in flow control 0
dcb.fErrorChar; // enable error replacement 0
dcb.fNull; // enable null stripping 0
dcb.fRtsControl; // RTS flow control 2
dcb.fAbortOnError; // abort reads/writes on error 0
dcb.fDummy2; // reserved 0
//dcb.wReserved; // not currently used 0
dcb.XonLim; // transmit XON threshold 2048
dcb.XoffLim; // transmit XOFF threshold 512
dcb.ByteSize; // number of bits/byte, 4-8 '\b'
dcb.Parity; // 0-4=3Dno,odd,even,mark,space '\x02' 0
dcb.StopBits; // 0,1,2 =3D 1, 1.5, 2 0
dcb.XonChar; // Tx and Rx XON character x11
dcb.XoffChar; // Tx and Rx XOFF character x13
dcb.ErrorChar; // error replacement character 0
dcb.EofChar; // end of input character 0
dcb.EvtChar; // received event character 0
dcb.wReserved1; // reserved; do not use 0
dcb.BaudRate =3D 1200; //CBR_57600
dcb.fParity =3D FALSE;
dcb.fRtsControl =3D RTS_CONTROL_TOGGLE; // ?
dcb.ByteSize =3D 8;
dcb.StopBits =3D TWOSTOPBITS;
dcb.fAbortOnError =3D 0;
dcb.fOutX =3D 0;
dcb.fInX =3D0;
dcb.fErrorChar =3D 0;
dcb.fNull =3D 0;
dcb.fAbortOnError =3D 0;
// dcb.fOutxCtsFlow =3D 1;
dcb.fOutxDsrFlow =3D 0;
dcb.fDtrControl =3D DTR_CONTROL_ENABLE;
dcb.fDsrSensitivity =3D 0;
// dcb.fTXContinueOnXoff
fSuccess =3D SetCommState(hCom,&dcb);
if (fSuccess =3D=3D 0)
{
AnsiString Text =3D "SetComState misslyckades!";
ErrorForm->FelBesk->Caption =3D Text;
ErrorForm->ShowModal();
if (hCom) {CloseHandle(hCom); hCom =3D 0;};
return 3;
}
return 0;
}
Change the above to suit your particular applicationfor your then read/wr=
ite
with something like this:
fStatus =3D WriteFile( hCom, // handle to file to write to
val.c_str(), //LPCVOID lpBuffer, // pointer to data to write to file
val.Length(), // DWORD nNumberOfBytesToWrite, // number of bytes to =
write
&written, //LPDWORD lpNumberOfBytesWritten, // pointer to number of =
bytes
written
NULL // &ow //LPOVERLAPPED lpOverlapped // pointer to structure nee=
ded for
overlapped I/O
);
}
BOOL fsuccess =3D ReadFile(hCom, // handle of file to read
ReadBuffer, // address of buffer that receives data
100, // number of bytes to read
&nrBytes, // address of structure for data
NULL // OVERLAP
);
|
|
From: Rafael C. <cha...@un...> - 2004-06-15 17:14:38
|
Well, when "Func" ends, its local variables (number)
are destroyed, so the result of printf shouldn't be
11 since "number" has been destroyed.
I tested your program and result was the same.
IMHO what may be happening is that your test program
is enough small to not modify the memory and
somehow pointer "p" is still pointing to a place
where the value is 11.
Change "main" as below and see the result.
In my test I had "x =3D 1" and "*p =3D 1".
main(){
int x =3D 1;
Func();
printf("x =3D %d\n", x);
printf("*p =3D %d\n", *p);
}
Maybe some other subscriber of this list could
give us a better answer. There are good programmers
here!
Hope it helps,
Rafael
Bruce jjs wrote:
> I have write a very simple program to test the pointer.The=20
> program is list belove:
> /* **************************************** */
> #include <stdio.h>
> =20
> int *p;
> =20
> =20
> void Func(void)
> {
> int number;
> =20
> number =3D 11;
> p =3D &number;
> }
> =20
> main()
> {
> Func();
> printf("*p =3D %d\n", *p);
> }
> /* ***************************** */
> The result is :
> *p =3D 11
> The variable "number" is local variable that will be=20
> destoryed after leave the Func( ) and the pointer "p" is pointer=20
> to it.Although p is global variable,it pointer to a deleted area. To my=
=20
> way of thinking,*p should be a ignorance value.Is my understand wrong?
> Thanks,
> Bruce.J
>=20
>=20
> -----------------------------------------------------------------------=
-
> Do You Yahoo!?
> =CF=D3=D3=CA=CF=E4=CC=AB=D0=A1=A3=BF=D1=C5=BB=A2=B5=E7=D3=CA=D7=D4=D6=FA=
=C0=A9=C8=DD=A3=A1=20
> <http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event=
/10m.html>=20
>=20
|
|
From: <sp...@po...> - 2004-06-15 14:10:33
|
Hi, 4.9.9.0 will have full installer with updated mingw. I'll try to fix the installer by then. Marek Guillermo Gutierrez wrote: >will there be an installer version that is a full installer? I ask because I don't seem to have the best of luck with upgrade installers, the last time I used an upgrade installer my dev-cpp install wouldn't compile anything. It would just give the message "unable to run the program" and this new version is doing the same thing. > >-----Original Message----- >From: dev...@li... >[mailto:dev...@li...]On Behalf Of Colin >Laplace >Sent: Thursday, June 10, 2004 1:51 PM >To: dev...@li... >Subject: Re: [Dev-C++] [UPDATE] Dev-C++ 4.9.8.10 version available > > > > >>Is this a full installer or just an upgrade? >>Will it reinstall the compiler as well? >> >> > >This is an update only - it doesn't contain the Mingw compiler system. > >Colin > > > >>-----Original Message----- >>From: dev...@li... >>[mailto:dev...@li...]On Behalf Of Colin >>Laplace >>Sent: Thursday, June 10, 2004 12:30 PM >>To: dev...@li... >>Subject: [Dev-C++] [UPDATE] Dev-C++ 4.9.8.10 version available >> >> >>Hello, >> >>Due to some bugs introduced in version 4.9.8.9, we decided to release a bug >>fix update before going on 4.9.9.0. >>You can download it from http://bloodshed.net/dev/devcpp.html >> >>Greetings, >>Colin Laplace >> >> >> |
|
From: Guillermo G. <ggu...@ma...> - 2004-06-15 14:04:54
|
will there be an installer version that is a full installer? I ask = because I don't seem to have the best of luck with upgrade installers, = the last time I used an upgrade installer my dev-cpp install wouldn't = compile anything. It would just give the message "unable to run the = program" and this new version is doing the same thing. -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Colin Laplace Sent: Thursday, June 10, 2004 1:51 PM To: dev...@li... Subject: Re: [Dev-C++] [UPDATE] Dev-C++ 4.9.8.10 version available > Is this a full installer or just an upgrade? > Will it reinstall the compiler as well? This is an update only - it doesn't contain the Mingw compiler system. Colin > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of Colin > Laplace > Sent: Thursday, June 10, 2004 12:30 PM > To: dev...@li... > Subject: [Dev-C++] [UPDATE] Dev-C++ 4.9.8.10 version available > > > Hello, > > Due to some bugs introduced in version 4.9.8.9, we decided to release = a bug > fix update before going on 4.9.9.0. > You can download it from http://bloodshed.net/dev/devcpp.html > > Greetings, > Colin Laplace > > > ------------------------------------------------------- > This SF.Net email is sponsored by: GNOME Foundation > Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. > GNOME Users and Developers European Conference, 28-30th June in Norway > http://2004/guadec.org > _______________________________________________ > 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: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ 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: <wer...@zf...> - 2004-06-15 11:10:52
|
Hi, on some other compilers (eg. Borland 3.1 or lccwin32) I can position = the cursor in a word (eg. printf ) in my program. When I press F1 I get a description of the library function. Is this feature als available with devcpp ? I tried to download = http://bloodshed.ygto.com/dev/packages/bin/GlibcHelp.DevPak which might = be such a help, but my browser ended with timeout. Mit freundlichen Gr=FC=DFen / Best regards Werner Sticht mailto:wer...@sa... Tel. (+49) [0] 9721/98-2595 |
|
From: A. K. <kli...@ad...> - 2004-06-15 08:59:42
|
Bruce jjs wrote:
> int *p;
>
> void Func(void)
> {
> int number;
>
> number = 11;
> p = &number;
> }
You assign a new address to that pointer, not a new value, and that new
address happens to contain "11" but it resides on the stack of course.
You should do
*p = number;
Then it will work as expected
Alex
|
|
From: <per...@ya...> - 2004-06-15 01:37:58
|
I have write a very simple program to test the pointer.The program is list belove:
/* **************************************** */
#include <stdio.h>
int *p;
void Func(void)
{
int number;
number = 11;
p = &number;
}
main()
{
Func();
printf("*p = %d\n", *p);
}
/* ***************************** */
The result is :
*p = 11
The variable "number" is local variable that will be destoryed after leave the Func( ) and the pointer "p" is pointer to it.Although p is global variable,it pointer to a deleted area. To my way of thinking,*p should be a ignorance value.Is my understand wrong?
Thanks,
Bruce.J
---------------------------------
Do You Yahoo!?
嫌邮箱太小?雅虎电邮自助扩容! |
|
From: Daniel K. O. <dan...@ya...> - 2004-06-14 21:53:36
|
Brian Wallace wrote:
> Couple questions about C++ compilers. Do they all have the ability to
> plugin assembly?
> IE: With VC++ 6.0
>
> __asm{
> -insert assembly here-
> }
IIRC, a C++ compiler doesn't have to support inline assembly. But almost
all C++ compilers support some way to write inline assembly.
> Will this work with all compilers.
Each compiler can have its own syntax for inlining assembly in the code;
and each one can have its own assembly syntax; and each different
architecture will have its own assembly syntax. So no, it won't work
with all compilers.
> I mainly want this for Linux programming. If anyone knows of a C++
> compiler for Linux that has easy assembly plugin context, please tell.
Ever heard of GCC? http://gcc.gnu.org :)
Also, a useful document about assembly in GCC:
http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html
(this doc is a little outdated; GCC now supports both AT&T and Intel
syntax, you just have to use the directive ".intel_syntax" or
".att_syntax", or compile with "-masm=att" or "-masm=intel")
> I want to do this to have complete control over video.
You mean you want to control your video hardware directly? The operating
system is in charge of the hardware handling, you can only use the
provided API. Inside an OS, you'll have as much control over your video
hardware with assembly as with C++ or almost every other language. If
you want to access the hardware directly you can't have an OS in your way.
> Thanks for time, please respond soon.
Quoting a popular writting from 'someone known by the "ESR" acronym':
http://www.catb.org/~esr/faqs/smart-questions.html#urgent
Danmiel K. O.
|