dev-cpp-users Mailing List for Dev-C++ (Page 287)
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: Asfe e <e_...@ho...> - 2003-11-27 02:40:19
|
Hi All,
Few questions...
1.What is the difference between Windows application,
WinMain project, empty project and console application on the Devcpp ?
Are these equal to the ones on MS VS6 ?
Please explain briefly about each one.
2.Does Devcpp support MFC or just win32api ?
3.Where can I get the full documation for the Devcpp ? The help that comes
with the app itself is
partial.
Im using Devcpp ver4 on Win2k.
Thanx,
Seth.
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
|
|
From: <ser...@ju...> - 2003-11-27 02:04:47
|
No, I did not. However, I did re-associate them when I re-installed Dev-C++ 4.0 Thanks for replying. I thought noone was going to bother to help. -------------------------------------------------------------- Did you unassociate the name selections for Dev-Cpp 4 when you uninstalled? -- ~~Scott Simontis~~ Programmer ________________________________________________________________ The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! |
|
From: Colin L. <ha...@bl...> - 2003-11-27 01:06:10
|
Hello, Thank you for your report, i have now fixed this bug. Ps: Please next time use this address to submit bug reports: http://bloodshed.net/bugs Greetings, Colin On Saturday 22 November 2003 15:18, you wrote: > Hello, > In the menu File/New/Project > What's the matter when we click on the C project button and language by > default button ? After this, when we create an other project it's always > checked on C++ project. Is it normal ? Is it a bug ? > Thanks for your answer. > matisso > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > 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: Colin L. <ha...@bl...> - 2003-11-27 00:07:23
|
Hello, > I've noticed that when I have the "Use fast but imperfect dependency > generation" option turned off, compiles fail with a "no rule to make > target" error. "Build All" succeeds, but "Compile" fails with this error. > Turning the "fast but imperfect" option back on eliminates the problem. I couldn't reproduce your problem. If possible, please send me your project file that I can check what's wrong. Greetings, Colin |
|
From: Colin L. <ha...@bl...> - 2003-11-26 23:58:39
|
Hello, > In 4.9.8.4 the include directory has a c++ subdirectory which was scanned > and included in the cache, but even including a file like iostream does not > enable code completion but I'm not sure how this is supposed to work > considering there are two files, one named iostream.h and one without the > extension in two different directories. They even seem to be different > files. I can't tell whether the one listed in c++\backward is actually > included because the window doesn't scroll horizontally. > In 4.9.8.5 the include directory has a g++-3 subdirectory. By default this > wasn't scanned and had to be manually added to the cache. Is this normal? 4.9.8.4 and 4.9.8.5 versions are just updates, they do not change your compiler tree nor contains new include files. Or maybe i didn't get your problem. If you use the Mingw compiler distributed with version 4.9.8.0 then you g++ include file path is include/c++. Greetings, Colin |
|
From: P.T. W. M. <pt...@ea...> - 2003-11-26 22:01:45
|
Where can I find the documentation for the preprocessor? Also, while I have installed the GNU C Library Ref in the Package Manager, I'm not sure how to gain access to it and use it. As you can see, I'm a total beginner, even after reading the FAQ, and looking at the Docs on the Dev-C++ site. Thanks, Patrick |
|
From: jo m. <non...@ho...> - 2003-11-26 20:08:21
|
Hello
I think I've found the problem: One of your Choices' enums is a macro. I've
found DELETE defined at winnt.h. I don't know what it is used for, or how it
is included, but if you delete DELETE, or rename it, your program compiles.
bye
>
>I'm experience an error that I am completely unfamiliar with. If someone
>can help me, please do so. I've listed the error lines and the compile log
>directly below...and for the really brave, I've placed the whole program at
>the bottom.
>
>Line 19: enum Choices { TEXTFILE = 1, UPDATE, NEW, DELETE, END };
>...
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
|
|
From: Kevin B. <kev...@ma...> - 2003-11-26 18:07:28
|
>After relocating the config files to their proper location on the network, >indeed, problem solved. Oops, I spoke too soon. After a complete purging of the local profile cache and a new login, Dev-Cpp is still attempting to look locally for the Application Data instead of respecting the redirection. So, I have to manually transer my settings from the network to the local folder Dev-Cpp wants. Thanks, --- Kevin |
|
From: Kevin B. <kev...@ma...> - 2003-11-26 17:56:57
|
>On my install of Win2000, which is set up for a network login, whenever I >log off all the global configuration settings for Dev-Cpp are lost, and >the next time I log in and start Dev-Cpp, it is as if I am running for the >first time. Where are those settings stored, so I can make sure they get >saved with my profile? I finally found them. They are being stored in a local cache of my network settings, which is not replicated to the network on logoff. Apparently, they're supposed to be stored in the Application Data folder, but the "wrong" folder is being selected. I think the issue here is that I am set up by a policy for Redirection. My profile's Application Data (among other things) is not stored locally at all, but is actually stored full time on the network. The Dev-Cpp config isn't being sent there; instead, it is going to a local directory under C:\Documents and Settings. Since the assumption is that things like that *should* be stored on the network, the logoff process does not upload locally stored Application Data to the network, hence the settings are lost every time. After relocating the config files to their proper location on the network, indeed, problem solved. So, anyway, I'm guessing this is a thing only when the Application Data folder is redirected to the network. Thanks, --- Kevin |
|
From: Kevin B. <kev...@ma...> - 2003-11-26 17:56:41
|
I've noticed that when I have the "Use fast but imperfect dependency generation" option turned off, compiles fail with a "no rule to make target" error. "Build All" succeeds, but "Compile" fails with this error. Turning the "fast but imperfect" option back on eliminates the problem. Using v.4.9.8.5 Thanks, --- Kevin |
|
From: Kevin B. <kev...@ma...> - 2003-11-26 17:13:45
|
On my install of Win2000, which is set up for a network login, whenever I log off all the global configuration settings for Dev-Cpp are lost, and the next time I log in and start Dev-Cpp, it is as if I am running for the first time. Where are those settings stored, so I can make sure they get saved with my profile? Thanks, --- Kevin |
|
From: Glenn W. <gl...@mr...> - 2003-11-26 15:28:34
|
Ok, so this is the third post on this topic, but I'm just trying to = understand how the cache works. =20 In 4.9.8.4 the include directory has a c++ subdirectory which was = scanned and included in the cache, but even including a file like = iostream does not enable code completion but I'm not sure how this is = supposed to work considering there are two files, one named iostream.h = and one without the extension in two different directories. They even = seem to be different files. I can't tell whether the one listed in = c++\backward is actually included because the window doesn't scroll = horizontally. =20 In 4.9.8.5 the include directory has a g++-3 subdirectory. By default = this wasn't scanned and had to be manually added to the cache. Is this = normal? =20 Just trying to learn c++ and the code completion will go a long way = towards familiarizing myself with the member functions but it seems to = work differently on each system and I am not sure how it is supposed to = work. Sincerely,=20 Glenn Welker=20 Director of Product Development=20 MRH Technology Group=20 =20 |
|
From: Mohamed I. <mi...@ac...> - 2003-11-26 08:17:56
|
Try to subscribe to the wxWindow discussion lists. Mohammed ----- Original Message ----- From: Dinesh Pillay <dp...@gm...> To: Dev C++ <dev...@li...> Sent: Wednesday, November 26, 2003 5:22 AM Subject: [Dev-C++] wxWindows > hello ppl, > just wanted to ask if anyone knew any links to tutorials or books (other > than those on wxwindows.org) on how to use wxWindows. Any such help would be > of great help > > thank u, > dinesh. > > - Perfection or Nothing. > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > 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-11-26 03:23:29
|
Everything from the standard C++ library should be (and in GCC it is) in the
standard namespace ("std"). You need to either import string into the
current namespace, or qualify the name explicitly.
In other words, either use:
using std::string;
or replace all your string variables from "string" to "std::string".
And while you're at it, read up on the C++ standard (especially namespaces)
:)
Regards,
Paul
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Flavio de
Souza
Sent: Wednesday, November 26, 2003 8:13 AM
To: dev...@li...
Subject: [Dev-C++] 'string' was not declared in this scope
I am trying to compile my program and I got an error:
'string' was not declared in this scope
Even if I put in the file #include <string>
What is happing?
See following my file header:
#ifndef MAX_REPLY_LENGTH
#define MAX_REPLY_LENGTH 512
#endif
#ifndef CRLF
#define CRLF \r\n
#endif
#ifndef MAX_COMMAND_LENGTH
#define MAX_COMMAND_LENGTH 64
#endif
#ifndef MAX_RECEIPT_BUFFER_SIZE
#define MAX_RECEIPT_BUFFER_SIZE 8192
#endif
//The stat command reply informs the number of messages and the size of
mailbox
#ifndef NUMBER_OF_STAT_REPLY_WORDS
#define NUMBER_OF_STAT_REPLY_WORDS 3 //The reply to STAT command will
give 3 words only
#endif
#ifndef POP3_h
#define POP3_h
#include <string>
#include "SocketConnection.h" //Maybe can occur errors here.
class POP
{
public:
POP();
virtual ~POP();
//--------------------------------
// POP Commands - AUTHORIZATION
//--------------------------------
int sendUser ();
int sendPASS ();
int sendQUIT ();
//--------------------------------
// POP Commands - TRANSACTION
//--------------------------------
int sendSTAT ();
int sendLIST ();
int sendLIST ( unsigned int Msg );
int sendRETR ( unsigned int Msg );
int sendDELE ( unsigned int Msg );
int sendNOOP ();
int sendRSET ();
//--------------------------------
// Optional POP3 Commands
//--------------------------------
int sendAPOP ( unsigned int Msg ); //valid in the AUTHORIZATION
state
int sendTOP ( unsigned int Msg ); //valid in the TRANSACTION state
int sendUIDL (); //valid in the TRANSACTION state
/*
Note that with the exception of the STAT, LIST, and UIDL commands,
the reply given by the POP3 server to any command is significant
only to "+OK" and "-ERR". Any text occurring after this reply
may be ignored by the client.
*/
int setPort ( int Port = 110 );
int setServerHost ( string ServerHost );
int setTimeOut ( unsigned int TimeOut = 30);
int setUserName ( string User );
int setPassword ( string Password);
int getPortNumber();
string getServerHostName();
unsigned int getTimeOut ();
string getHostReply();
unsigned int getMailboxSize();
unsigned int getTotalMessages();
unsigned int getCurrentMessageSize();
unsigned int getCurrentMessageNumber();
private:
SocketConnection _connection; //Socket object to stabilish
connection
bool _connectionUp; //Inform if connection is still Ok
string _receiverBuffer;//Receive reply from POP server
int _port;
string _serverHost;
string _user;
string _password;
unsigned int _timeOut; //Max waiting time in miliseconds
unsigned int _statusIndicator; //It holds 1 if response is "+OK"
and 0 if response is "-ERR"
unsigned int _totalOfMessages; //Holds the total of messages in
one session to download.
unsigned int _sizeOfMailbox; //Holds the size of the mailbox
unsigned int _sizeCurrentMessage;
unsigned int _currentMessage;
int _connect(); //Method that connects the socket
int _sendCommand( const char *Command ); //Send POP
command
};
#endif // POP3_h
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.543 / Virus Database: 337 - Release Date: 21/11/2003
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
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: Asfe e <e_...@ho...> - 2003-11-26 02:59:44
|
Hi All, In order to do some testing, Im trying to build a small tool that will allow me to perform the next things: Fill a web page text fields, radio buttons and click on buttons. Read text from text fields (web and windows) The ideal way will be to do everything with C++(win32api and native). Maybe one of you can guide me to the right direction. I'm using the devcpp ver 4. Thanks in advance, Seth. _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail |
|
From: Dinesh P. <dp...@gm...> - 2003-11-26 02:22:43
|
hello ppl,
just wanted to ask if anyone knew any links to tutorials or books (other
than those on wxwindows.org) on how to use wxWindows. Any such help would be
of great help
thank u,
dinesh.
- Perfection or Nothing.
|
|
From: Flavio de S. <fla...@ya...> - 2003-11-26 01:10:31
|
I am trying to compile my program and I got an error:
'string' was not declared in this scope
Even if I put in the file #include <string>
What is happing?
See following my file header:
#ifndef MAX_REPLY_LENGTH
#define MAX_REPLY_LENGTH 512
#endif
#ifndef CRLF
#define CRLF \r\n
#endif
#ifndef MAX_COMMAND_LENGTH
#define MAX_COMMAND_LENGTH 64
#endif
#ifndef MAX_RECEIPT_BUFFER_SIZE
#define MAX_RECEIPT_BUFFER_SIZE 8192
#endif
//The stat command reply informs the number of messages and the size of
mailbox
#ifndef NUMBER_OF_STAT_REPLY_WORDS
#define NUMBER_OF_STAT_REPLY_WORDS 3 //The reply to STAT command will
give 3 words only
#endif
#ifndef POP3_h
#define POP3_h
#include <string>
#include "SocketConnection.h" //Maybe can occur errors here.
class POP
{
public:
POP();
virtual ~POP();
//--------------------------------
// POP Commands - AUTHORIZATION
//--------------------------------
int sendUser ();
int sendPASS ();
int sendQUIT ();
//--------------------------------
// POP Commands - TRANSACTION
//--------------------------------
int sendSTAT ();
int sendLIST ();
int sendLIST ( unsigned int Msg );
int sendRETR ( unsigned int Msg );
int sendDELE ( unsigned int Msg );
int sendNOOP ();
int sendRSET ();
//--------------------------------
// Optional POP3 Commands
//--------------------------------
int sendAPOP ( unsigned int Msg ); //valid in the AUTHORIZATION
state
int sendTOP ( unsigned int Msg ); //valid in the TRANSACTION state
int sendUIDL (); //valid in the TRANSACTION state
/*
Note that with the exception of the STAT, LIST, and UIDL commands,
the reply given by the POP3 server to any command is significant
only to "+OK" and "-ERR". Any text occurring after this reply
may be ignored by the client.
*/
int setPort ( int Port = 110 );
int setServerHost ( string ServerHost );
int setTimeOut ( unsigned int TimeOut = 30);
int setUserName ( string User );
int setPassword ( string Password);
int getPortNumber();
string getServerHostName();
unsigned int getTimeOut ();
string getHostReply();
unsigned int getMailboxSize();
unsigned int getTotalMessages();
unsigned int getCurrentMessageSize();
unsigned int getCurrentMessageNumber();
private:
SocketConnection _connection; //Socket object to stabilish
connection
bool _connectionUp; //Inform if connection is still Ok
string _receiverBuffer;//Receive reply from POP server
int _port;
string _serverHost;
string _user;
string _password;
unsigned int _timeOut; //Max waiting time in miliseconds
unsigned int _statusIndicator; //It holds 1 if response is "+OK"
and 0 if response is "-ERR"
unsigned int _totalOfMessages; //Holds the total of messages in
one session to download.
unsigned int _sizeOfMailbox; //Holds the size of the mailbox
unsigned int _sizeCurrentMessage;
unsigned int _currentMessage;
int _connect(); //Method that connects the socket
int _sendCommand( const char *Command ); //Send POP
command
};
#endif // POP3_h
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.543 / Virus Database: 337 - Release Date: 21/11/2003
|
|
From: Damien A <g_...@ho...> - 2003-11-25 20:34:37
|
<html><div style='background-color:'><DIV> <P><BR><BR></P></DIV> <DIV></DIV>>From: "Noorez Kassam" <COO...@HO...> <DIV></DIV>>To: dev...@li... <DIV></DIV>>Subject: [Dev-C++] windows app <DIV></DIV>>Date: Tue, 25 Nov 2003 12:47:04 -0700 <DIV></DIV>>MIME-Version: 1.0 <DIV></DIV><mailto:dev...@li...?subject=help><mailto:dev...@li...><mailto:dev...@li...?subject=subscribe><mailto:dev...@li...?subject=unsubscribe> <DIV></DIV>>[Warning] In function `int WinMain(void *, void *, CHAR *, int)': <DIV></DIV>>line 75: ANSI C++ forbids implicit conversion from `void *' in <DIV></DIV>>argument passing <DIV></DIV>> <DIV></DIV>>the error is marked. <DIV></DIV>> <DIV></DIV> <DIV></DIV>> <DIV></DIV>>int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR <DIV></DIV>>lpszCmdParam, <DIV></DIV>> int nCmdShow) <DIV></DIV> <DIV>The parameters of your WinMain function are incorrect. Try</DIV> <DIV>int PASCAL WinMain(<STRONG>HINSTANCE</STRONG> hInstance, <STRONG>HINSTANCE</STRONG> hPrevInstance, LPSTR lpszCmdParam, int nCmdShow) </DIV> <DIV> </DIV></mailto:dev...@li...?subject=unsubscribe></mailto:dev...@li...?subject=subscribe></mailto:dev...@li...></mailto:dev...@li...?subject=help></div><br clear=all><hr>Add photos to your e-mail with <a href="http://g.msn.com/8HMAEN/2746??PS=">MSN 8.</a> Get 2 months FREE*.</html> |
|
From: Noorez K. <coo...@ho...> - 2003-11-25 19:47:10
|
This app doesn't work. I get this compile error:
[Warning] In function `int WinMain(void *, void *, CHAR *, int)':
line 75: ANSI C++ forbids implicit conversion from `void *' in argument
passing
the error is marked.
#include <windows.h>
long FAR PASCAL _export WndProc(HWND hwnd, UINT message, UINT wParam, LONG
lParam)
{
HDC hdc;
HPEN hpen, hpenOld;
PAINTSTRUCT ps;
RECT rect;
switch(message)
{
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &rect);
hpen = CreatePen(PS_SOLID,6,RGB(0, 0, 255));
hpenOld = (HPEN)SelectObject(hdc, hpen);
Rectangle(hdc,rect.left + 10,
rect.top + 10,
rect.right - 10,
rect.bottom - 10);
DrawText(hdc, "Hello, world!", -1, &rect,
DT_SINGLELINE | DT_CENTER | DT_VCENTER);
SelectObject(hdc, hpenOld);
DeleteObject(hpen);
EndPaint(hwnd, &ps);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR
lpszCmdParam,
int nCmdShow)
{
static char szAppName[] = "Hello";
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
if(!hPrevInstance)
{
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = (char*)szAppName;
RegisterClass(&wndclass);
}
hwnd = CreateWindow(szAppName, //window class name
"HELLO Program", //windows caption
WS_OVERLAPPEDWINDOW, //window style
CW_USEDEFAULT, //inital x position
CW_USEDEFAULT, //inital y position
CW_USEDEFAULT, //inital x size
CW_USEDEFAULT, //inital y size
NULL, //parent window handle
NULL, //window menu handle
hInstance, //program instance handle
NULL); //creation paramaters /*error is
hear*/
ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca
|
|
From: Opacki, J. <Jos...@ng...> - 2003-11-25 19:10:33
|
Hello All,
I'm experience an error that I am completely unfamiliar with. If someone
can help me, please do so. I've listed the error lines and the compile log
directly below...and for the really brave, I've placed the whole program at
the bottom.
Line 19: enum Choices { TEXTFILE = 1, UPDATE, NEW, DELETE, END };
*
*
Line 41: while ( ( choice = enterChoice() ) != END )
*** COMPILE LOG ***
Compiler: Default compiler
Building Makefile: "C:\compile\Makefile.win"
Executing make...
make.exe -f "C:\compile\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward"
-I"C:/Dev-Cpp/include" main.cpp:19: parse error before numeric constant
main.cpp: In function `int main()':
main.cpp:41: `END' undeclared (first use this function) main.cpp:41: (Each
undeclared identifier is reported only once for each
function it appears in.) make.exe: *** [main.o] Error 1 Execution
terminated
** END COMPILE LOG ***
Thanks.
Joseph
*** MAIN.CPP ***
// this program reads a random access file sequentially,
// updates data already written to the file, creates new
// data to be placed in the file, and deletes data already in the file
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <iomanip>
using namespace std;
struct clientData
{
int accountNumber;
char lastName[ 15 ];
char firstName[ 10 ];
double balance;
};
int enterChoice();
void textFile( fstream& );
void updateRecord( fstream& );
void newRecord( fstream& );
void deleteRecord( fstream& );
void outputLine( ostream&, const clientData & );
int getAccount( const char * const );
enum Choices { TEXTFILE = 1, UPDATE, NEW, DELETE, END };
int main()
{
fstream inOutCredit( "credit.dat", ios::in | ios::out );
if ( !inOutCredit )
{
cerr << "File could not be opened." << endl;
exit( 1 );
}
int choice;
while ( ( choice = enterChoice() ) != END )
{
switch ( choice )
{
case TEXTFILE:
textFile( inOutCredit );
break;
case UPDATE:
updateRecord( inOutCredit );
break;
case NEW:
newRecord( inOutCredit );
break;
case DELETE:
deleteRecord( inOutCredit );
break;
default:
cerr << "Incorrect choice \n";
break;
}
inOutCredit.clear(); // resets end-of-file indicator
}
system("pause");
return 0;
}
// prompt for and input menu choice
int enterChoice()
{
cout << "\nEnter your choice" << endl
<< "1 - store a formatted text file of accounts\n"
<< " called \"print.txt\" for printing\n"
<< "2 - update an account\n"
<< "3 - add a new account\n"
<< "4 - delete an account\n"
<< "5 - endl program\n? ";
int menuChoice;
cin >> menuChoice;
return menuChoice;
}
// create a formated text file for printing
void textFile( fstream &readFromFile )
{
ofstream outPrintFile( "print.txt", ios::out );
if ( !outPrintFile )
{
cerr << "File could not be opened." << endl;
exit( 1 );
}
outPrintFile << setiosflags( ios::left ) << setw( 10 )
<< "Account" << setw( 16 ) << "Last Name" << setw( 11 )
<< "First Name" << resetiosflags( ios::left )
<< setw( 10 ) << "Balance" << endl;
readFromFile.seekg( 0 );
clientData client;
readFromFile.read( reinterpret_cast<char *>( &client ), sizeof(
clientData ) );
while ( !readFromFile.eof() )
{
if ( client.accountNumber != 0 )
{
outputLine( outPrintFile, client );
}
readFromFile.read( reinterpret_cast<char *>( &client ), sizeof(
clientData ) );
}
}
// update an account's balance
void updateRecord( fstream &updateFile )
{
int account = getAccount( "Enter an account to update" );
updateFile.seekg( ( account - 1 ) * sizeof( clientData ) );
clientData client;
updateFile.read( reinterpret_cast<char *>( &client ), sizeof( clientData
) );
if ( client.accountNumber != 0 )
{
outputLine( cout, client );
cout << "\nEnter charge (+) or payment (-): ";
double transaction; // charge or payment
cin >> transaction; // should validate
client.balance += transaction;
outputLine( cout, client );
updateFile.seekp( ( account - 1 ) * sizeof( clientData ) );
updateFile.write( reinterpret_cast<char *>( &client ), sizeof(
clientData ) );
} else
{
cerr << "Account #" << account << " has no information." << endl;
}
}
// create and insert new record
void newRecord( fstream &insertInFile )
{
int account = getAccount( "Enter new account number" );
insertInFile.seekg( ( account - 1 ) * sizeof( clientData ) );
clientData client;
insertInFile.read( reinterpret_cast<char *>( &client ), sizeof(
clientData ) );
if ( client.accountNumber == 0 )
{
cout << "Enter lastname, firstname, balance\n? ";
cin >> client.lastName >> client.firstName >> client.balance;
client.accountNumber = account;
insertInFile.seekp( ( account - 1 ) * sizeof( clientData ) );
insertInFile.write( reinterpret_cast<char *>( &client ), sizeof(
clientData ) );
} else
{
cerr << "Account #" << account << "already contains information."
<< endl;
}
}
// output a line of client information
void outputLine( ostream &output, const clientData &c )
{
output << setiosflags( ios::left ) << setw( 10 )
<< c.accountNumber << setw( 16 ) << c.lastName
<< setw( 11 ) << c.firstName << setw( 10 )
<< setprecision( 2 ) << resetiosflags( ios::left )
<< setiosflags( ios::fixed | ios::showpoint )
<< c.balance << '\n';
}
// get an accoun number from the keyboard
int getAccount( const char * const prompt )
{
int account;
do
{
cout << prompt << " ( 1 - 100 ): ";
cin >> account;
} while ( account < 1 || account > 100 );
return account;
}
|
|
From: Maya <Esc...@ne...> - 2003-11-25 17:54:50
|
In the parent class
~~~~~~~~~~~~~~~~~~~
class Parent{
public:
int a, b, c, d, e;
.....
template<class charT, class Traits>
friend std::basic_istream<charT, Traits>&
operator>> (std::basic_istream<charT, Traits>&, Parent&);
template<class charT, class Traits>
friend std::basic_ostream<charT, Traits>&
operator<< (std::basic_ostream<charT, Traits>&, Parent& );
In the chile class
~~~~~~~~~~~~~~~~~~
class Chile : virtual public Parent{
public:
int f,g;
......
template<class charT, class Traits>
friend std::basic_istream<charT, Traits>&
operator>> (std::basic_istream<charT, Traits>&,Chile&);
template<class charT, class Traits>
friend std::basic_ostream<charT, Traits>&
operator<< (std::basic_ostream<charT, Traits>&, Chile& );
As you can see, the derived class also has a inserter and an extractor
overloaded operator. However, in the driver program [main.cpp] I want to
make a call to the overloaded inserter and extractor from the Parent
class, but don't know how to go about it!
void main(){
Chile obj;
obj.a = 1; obj.b = 2; obj.c = 3; obj.d = 4; obj.e = 5; obj.f = 6;
obj.g = 7;
...
std::cout << obj << std::endl; // which inserter is called here?
}
--
Jorge Escalante
FYI
http://www.astro.umd.edu/~marshall/abbrev.html
E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a point of humiliation.
- Jean Chretien
* The media's the most powerful entity on earth. They have the
power to make the innocent guilty and to make the guilty
innocent, and that's power.
- Malcom X
* "Innocent until proven guilty", no... not in Canada!!
|
|
From: Ferdinando F. <s2...@st...> - 2003-11-25 16:07:13
|
On Tue, 25 Nov 2003, Coosa wrote: > I heard later that i must create a FileA.a from the FileA.o, but i have no idea how to do this! > Can some please one help me on that? Well, from a shell console (cmd.exe) type [path_to_bin_dir]ar crs [path_to_lib_dir]libxxx.a [list_of_object_files] where xxx is the name you would give to your library (the .a file) and paths are subdirectories (bin, lib) in your compiler installation directory. Then you can include object files in your project by writing in the 'link' section of project settings the line -lxxx Note that you can even chose to keep the lib in your project dir, but you should set in the options '-L.', that tell the compiler to search libraries in your dir. Well, actually I'm not so sure about this. If you need it, I can post you some man pages in ASCII format about 'ar' or other tools. Please, you all let me know if I said something wrong or stupid. Bye. Ferdinando. |
|
From: Coosa <co...@gm...> - 2003-11-25 12:30:07
|
Hi all, I have the following problem: I'm working with Dev C++ 4.9.8.5 and suppose i have the following = scenario: A project consistes of the following files: 1.. project.dev=20 2.. main.cpp=20 3.. FileA.cpp=20 4.. FileA.h After compilation i get also: 1.. main.o=20 2.. FileA.o Now later i can also delete the FileA.cpp and insted use the object file = and just include the FileA.h to the project. Theat's all fine. But when i want to use the same file with a normal source file (not a = project) i can't simply use the functions i created in the FileA.cpp and = just include the FileA.h though i copied the FileA.o to the default = library directory and the FileA.h to the default include Directory. I heard later that i must create a FileA.a from the FileA.o, but i have = no idea how to do this! Can some please one help me on that? |
|
From: Per W. <pw...@ia...> - 2003-11-25 08:29:30
|
Unix doesn't forbid the use of space in directory or file names. They are just a slight nuisance, since you have to either put the names within citation marks, or put a break character (\) before the space. /Per W On Tue, 25 Nov 2003, P.D. van Zelst wrote: > Hi, > > You probably installed Dev-C++ in something like "C:\Program Files\...", > right? Always avoid any paths or filenames containing spaces when dealing > with tools originating in Unix/Linux... they don't handle spaces well > (considering they're invalid in Unix/Linux). Dev-C++ uses the MingW port of > the GCC compiler set as the compiler, which was originally written for > Unix/Linux. Completely uninstall (and delete the config files), and then > perform a fresh install. Install in a path _without any spaces_. Also, don't > place any of your source files or projects in paths with spaces (note: "My > Documents" and the desktop are paths with spaces as well!). > > For more information, please look at this thread from the Dev-C++ forum: > https://sourceforge.net/forum/forum.php?thread_id=959971&forum_id=48211 > > Regards, > > > Paul > > ________________________________ > > From: dev...@li... > [mailto:dev...@li...] On Behalf Of Chris Sroka > Sent: Tuesday, November 25, 2003 1:00 AM > To: dev...@li... > Subject: [Dev-C++] Compile problems DevC++ 4.9.8.5 > > > > > I have been using DevC++ V4 very successfully for the last year. Today I > upgraded to version 4.9.8.5 from http://bloodshed.net/dev/devcpp4985.zip > > I opened an old project, and tried to compile it and got this message: > ___________________________ > Compiler: Default compiler > Building Makefile: "C:\Users\CSroka\FreqPlan\Makefile.win" > Executing make clean > rm -f main.o FreqPlan_private.res FreqPlan.exe process_begin: > CreateProcess((null), rm -f main.o FreqPlan_private.res FreqPlan.exe, ...) > failed. > > make (e=2): The system cannot find the file specified. make.exe: *** [clean] > Error 2 Execution terminated > ___________________________ > > The files "C:\Users\CSroka\FreqPlan\Makefile.win" and FreqPlan_private.res > do exist in the project directory. > > So I thought the program paths are wrong and need to be set correctly. > > When I try to point to my DevC++ program folder (In: Tools->Compiler > options->Programs) I notice that all the paths are to C:\Program. Even if I > change them to my actual DevC++ program folder they always revert to > C:\Program. Could this be causing the problem? If so then how do I get the > programs to point to my actual DevC++ folder, and not C:\Program? > > Thanks > Chris > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > 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-11-25 00:15:30
|
Hi, You probably installed Dev-C++ in something like "C:\Program Files\...", right? Always avoid any paths or filenames containing spaces when dealing with tools originating in Unix/Linux... they don't handle spaces well (considering they're invalid in Unix/Linux). Dev-C++ uses the MingW port of the GCC compiler set as the compiler, which was originally written for Unix/Linux. Completely uninstall (and delete the config files), and then perform a fresh install. Install in a path _without any spaces_. Also, don't place any of your source files or projects in paths with spaces (note: "My Documents" and the desktop are paths with spaces as well!). For more information, please look at this thread from the Dev-C++ forum: https://sourceforge.net/forum/forum.php?thread_id=959971&forum_id=48211 Regards, Paul ________________________________ From: dev...@li... [mailto:dev...@li...] On Behalf Of Chris Sroka Sent: Tuesday, November 25, 2003 1:00 AM To: dev...@li... Subject: [Dev-C++] Compile problems DevC++ 4.9.8.5 I have been using DevC++ V4 very successfully for the last year. Today I upgraded to version 4.9.8.5 from http://bloodshed.net/dev/devcpp4985.zip I opened an old project, and tried to compile it and got this message: ___________________________ Compiler: Default compiler Building Makefile: "C:\Users\CSroka\FreqPlan\Makefile.win" Executing make clean rm -f main.o FreqPlan_private.res FreqPlan.exe process_begin: CreateProcess((null), rm -f main.o FreqPlan_private.res FreqPlan.exe, ...) failed. make (e=2): The system cannot find the file specified. make.exe: *** [clean] Error 2 Execution terminated ___________________________ The files "C:\Users\CSroka\FreqPlan\Makefile.win" and FreqPlan_private.res do exist in the project directory. So I thought the program paths are wrong and need to be set correctly. When I try to point to my DevC++ program folder (In: Tools->Compiler options->Programs) I notice that all the paths are to C:\Program. Even if I change them to my actual DevC++ program folder they always revert to C:\Program. Could this be causing the problem? If so then how do I get the programs to point to my actual DevC++ folder, and not C:\Program? Thanks Chris |