dev-cpp-users Mailing List for Dev-C++ (Page 551)
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: Ioannis V. <no...@ho...> - 2002-07-25 01:25:33
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Rama S
> Sent: Wednesday, July 24, 2002 5:30 PM
> To: dev...@li...
> Subject: [Dev-C++] studyresources
>
>
> Hi all!!
> I had started coding in VC++ recently.I got a project where i need
> to make some interface front end using vc++ and store data in XML
> format.
> Can anyone suggest some good tutorials/reference sites to
> begin..
>
> Thanks in advance
> Rama
> Student-Master Ingeneria,
> SSSUP.
I assume you are talking about .NET. Well, i can only recommend the book
i am currently reading (and has this XML stuff in later chapters from
where i am currently) which is "Microsoft Visual C++ .NET Step by Step"
by Templeman - Olsen, Microsoft Press.
About interfaces you will use the __interface keyword in your class
definition like
__gc __interface Imygraphicslibrary
{
// ...
};
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Hongl L. <h....@ch...> - 2002-07-24 20:18:47
|
we...@ha... wrote: > Hi, > > I have 3 distinct doubts... and will write here... maybe someone can help > me. ;) > > 1) Where can i get the list of API's of Windows with prototypes and examples > of how to use or explication of each paramter of prototypes ?? :) (if > possible to download it.:)) > http://msdn.microsoft.com/ > 2) I done a little code in C (for dos) that read a file binary and change a > offset. The code compile and run perfectily. > But when i create it under win32 application project project (C or C++) it > gave me the error: > > The instruction at "0x004014b7" referenced memory at "0x026ec5bd". The > memory could not be "written". > > Click on OK to terminate the program. > > And the some program (with the some code) work properly in a project od C > (for 16 bits). Why this problem ?? A Bug in Dev-C++ ?? How to fix it ?? :) I can't give you any information without looking at your source code... > 3) How to use "format strings" with MessageBox ?? > > For example in normal i do: > > MessageBox(NULL, "File not found!!", "ERROR", MB_OK); Add -liberty to compiler options. #include <libiberty.h> char *msg; asprintf (&msg, "File %s not found!!", filename); MessageBox (0, msg, "ERROR", MB_OK); free (msg); |
|
From: <we...@ha...> - 2002-07-24 19:46:51
|
Hi, I have 3 distinct doubts... and will write here... maybe someone can help me. ;) 1) Where can i get the list of API's of Windows with prototypes and examples of how to use or explication of each paramter of prototypes ?? :) (if possible to download it.:)) 2) I done a little code in C (for dos) that read a file binary and change a offset. The code compile and run perfectily. But when i create it under win32 application project project (C or C++) it gave me the error: The instruction at "0x004014b7" referenced memory at "0x026ec5bd". The memory could not be "written". Click on OK to terminate the program. And the some program (with the some code) work properly in a project od C (for 16 bits). Why this problem ?? A Bug in Dev-C++ ?? How to fix it ?? :) 3) How to use "format strings" with MessageBox ?? For example in normal i do: MessageBox(NULL, "File not found!!", "ERROR", MB_OK); Suppose that i want print "File name_of_file not found" suppose that the name_of_file is a vector. Example: char File[]="ProgTest"; I tryed of several ways like: MessageBox(NULL, "File %s not found!!", "ERROR", MB_OK,File); Or: MessageBox(NULL, "File %s not found!!",File, "ERROR", MB_OK); But it didn't work. It say that have much arguments to MessageBox. Then how to do it ?? Thkz... and Best Regards. [ ]'s |
|
From: Santiago P. C. <San...@yd...> - 2002-07-24 16:32:26
|
Hi,
To manage registry keys and values, you must first open a key and then
manage its values, SO...
You must have in mind that registry _KEYS_ and registry _VALUES_ are
different things!!!
(Take a look at the code bellow and check variables named: szKey and
szValueName)
Here you have a little C program that reads a DWORD value, increases it and
stores it again in the registry. Values are printed on the screen.
To handle a string you should modify a few values:
dwDataType must macht with REG_STRING,
dwDataSize must be high enough to store the retrieved value,
and few more...
Hope this helps!
Regards ,Santy
<CODE>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#define MAX_VALUE 256
// FUNTIONs DEFINITIONs
void OutputString(char* szInfoStr);
void OutputValue(DWORD dwValue, char* lpStr = NULL);
// FUNCTIONs IMPLEMENTATION
void OutputString(char* lpStr)
{
if (lpStr != NULL)
printf("%s\n",lpStr);
}
void OutputValue(DWORD dwValue, char* lpStr)
{
char szStr[256];
if (lpStr != NULL)
sprintf(szStr,"[%s] Value: %d",lpStr,(int)dwValue);
else
sprintf(szStr,"Value: %d",(int)dwValue);
OutputString(lpStr);
}
void ShowSystemErrorMsg(DWORD dwError)
{
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |FORMAT_MESSAGE_FROM_SYSTEM,
NULL, dwError,
(DWORD)MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf, (DWORD) 0,
NULL);
OutputString((char*)lpMsgBuf);
LocalFree(lpMsgBuf);
}
int main(int argc, char *argv[])
{
char szKey[] = "Whatever\\Your\\Key\\Path\\Looks\\Like";
char szValueName[] = "MyValue";
UINT uValue = 0;
HKEY hRegKey = NULL;
DWORD dwError = 0;
DWORD dwDataType = 0; // type buffer
DWORD dwDataSize = sizeof(DWORD); // size of data buffer
LPBYTE lpByteData = NULL; // data buffer
// Try to open key
dwError = (DWORD) RegOpenKeyEx(HKEY_CURRENT_USER, (LPCTSTR)szKey, 0,
KEY_ALL_ACCESS, &hRegKey );
if (dwError == ERROR_SUCCESS)
{
lpByteData = (LPBYTE) LocalAlloc(LPTR,(UINT)dwDataSize);
if (lpByteData != NULL)
{
// Get current value
dwError = (DWORD)
RegQueryValueEx(hRegKey,(LPCTSTR)szValueName,NULL,
(LPDWORD)&dwDataType,lpByteData,(LPDWORD)&dwDataSize);
if ( (dwError == ERROR_SUCCESS)&&(dwDataType == REG_DWORD) )
{
// Output retrieved data
uValue = (UINT) (*lpByteData);
OutputValue(uValue,"Previous Value");
// Increase current cycle
uValue = (++uValue%MAX_VALUE);
OutputValue(uValue,"Increased Value");
// Store new value for MyValue at registry
dwError = RegSetValueEx(hRegKey,(LPCTSTR)szValueName, 0,
REG_DWORD, (BYTE*)&uValue, dwDataSize);
if ( (dwError != ERROR_SUCCESS))
{
OutputValue(dwError,"RegSetValueEx - dwError");
ShowSystemErrorMsg(dwError);
}
// Flush Data anyway
RegFlushKey(hRegKey);
}
// Free dynamic memory
LocalFree(lpByteData);
}
// Close RegistryKey
RegCloseKey(hRegKey);
}
else
ShowSystemErrorMsg(dwError);
return 0;
}
</CODE>
-----Original Message-----
From: we...@ha... [mailto:we...@ha...]
Sent: Saturday, February 23, 2002 10:01 PM
To: dev...@li...
Subject: [Dev-C++] Flush or set valeu from a key of Registry.
Hi,
I want to flush (delete) a string value from registry.
I tryed to set it to 0 of this mode:
#include <windows.h>
int main(int argc, char *argv[])
{
HKEY hKey;
DWORD dwDisposition;
unsigned char *szBuf = (unsigned char *)strdup("0");
if (RegSetValueEx(HKEY_CURRENT_USER,
"\\Software\\Microsoft\\Security\\say\\", 0, REG_SZ, szBuf,
strlen((char*)szBuf)) != ERROR_SUCCESS)
return 1;
RegCloseKey(hKey);
return 0;
}
But it didn't set the value of:
\\HKEY_CURRENT_USER\\Software\\Microsoft\\Security\\say to "0". It crate a
key \\Software\\Microsoft\\Security\\say in \\HKEY_CURRENT_USER . :P
How to do to is set this value ??
And how to for example delete a key \\Software\\Microsoft\\Security\\say\\
??
Can someone gave examples ?? :)
Thkz and Best Regards.
[ ]'s
-------------------------------------------------------
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
--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. No confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. Opinions, conclusions and
other information in this message that do not relate to the official business of
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it.
--------------------------------------------------------------------------------------
|
|
From: john <jw...@dt...> - 2002-07-24 15:21:15
|
I compiled and ran all of the samples, but the sample for wxwindows seems inordinately large. Is there or are there plans for a dll, or should I just compile by own. As an aside, I dowloaded some VC++ project files directly from the wxwindows site and attempted to compile these, apparently they need some tweaking, which I may do, but I'm spoiled as projects for FLTK and SDL compiled without a hitch. Which reminds me, how is the FLTK package for DEV-C++ comming? ;) -- -John |
|
From: <we...@ha...> - 2002-07-24 14:58:39
|
Hi,
I want to flush (delete) a string value from registry.
I tryed to set it to 0 of this mode:
#include <windows.h>
int main(int argc, char *argv[])
{
HKEY hKey;
DWORD dwDisposition;
unsigned char *szBuf = (unsigned char *)strdup("0");
if (RegSetValueEx(HKEY_CURRENT_USER,
"\\Software\\Microsoft\\Security\\say\\", 0, REG_SZ, szBuf,
strlen((char*)szBuf)) != ERROR_SUCCESS)
return 1;
RegCloseKey(hKey);
return 0;
}
But it didn't set the value of:
\\HKEY_CURRENT_USER\\Software\\Microsoft\\Security\\say to "0". It crate a
key \\Software\\Microsoft\\Security\\say in \\HKEY_CURRENT_USER . :P
How to do to is set this value ??
And how to for example delete a key \\Software\\Microsoft\\Security\\say\\
??
Can someone gave examples ?? :)
Thkz and Best Regards.
[ ]'s
|
|
From: Rama S <i_a...@re...> - 2002-07-24 14:32:27
|
Hi all!! I had started coding in VC++ recently.I got a project where i need to make some interface front end using vc++ and store data in XML format. Can anyone suggest some good tutorials/reference sites to begin.. Thanks in advance Rama Student-Master Ingeneria, SSSUP. |
|
From: Daniel G. <sp...@ho...> - 2002-07-24 14:05:49
|
Can somebody help me out with this?
// Default constructor
AddPrinterDialog::AddPrinterDialog()
{
}
How do I get it to throw an exception is construction fails? I tried using
try
{
ClassPointer = new AddPrinterDialog;
}
catch (...)
{
//... code here
}
in the constructor's body but I got into an assertion loop (as code here was
PostQuitMessage).
Any ideas?????
Daniel
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
|
|
From: <we...@ha...> - 2002-07-24 13:54:06
|
Hi,
I want to flush (delete) a string value from registry.
I tryed to set it to 0 of this mode:
#include <windows.h>
int main(int argc, char *argv[])
{
HKEY hKey;
DWORD dwDisposition;
unsigned char *szBuf = (unsigned char *)strdup("0");
if (RegSetValueEx(HKEY_CURRENT_USER,
"\\Software\\Microsoft\\Security\\say\\", 0, REG_SZ, szBuf,
strlen((char*)szBuf)) != ERROR_SUCCESS)
return 1;
RegCloseKey(hKey);
return 0;
}
But it didn't set the value of:
\\HKEY_CURRENT_USER\\Software\\Microsoft\\Security\\say to "0". It crate a
key \\Software\\Microsoft\\Security\\say in \\HKEY_CURRENT_USER . :P
How to do to is set this value ??
And how to for example delete a key \\Software\\Microsoft\\Security\\say\\
??
Can someone gave examples ?? :)
Thkz and Best Regards.
[ ]'s
|
|
From: Zodiaq <zo...@ac...> - 2002-07-24 08:18:23
|
Hello Artin and all Dev-C++ users, Saturday, July 20, 2002, 12:56:22 AM, Artin wrote as follows: AB> Unsubscribe, Unsubscribe, one more time UNSUBSCRIBE ME. Does anone know any very annoying spam services? I mean that we could subscribe this boy: Artin Baghdasarian <ar...@ya...> to all of them... give me few urls... -- regards, Zodiaq |
|
From: Roberto R. <rob...@ar...> - 2002-07-24 03:59:12
|
Hi all, I ported all my code from DJGPP to Dev-C++ in ansi C format. The compilation is ok now. But when I run it the program crash near at the end. I use some like 8 files to read or write in a form FILE *fp1 ...*fp8; fp1 = fopen(archme,"r"); fp2 = fopen(archme,"w"); and so on fprintf (fp2,"format", variables here ); ........ ......... etc. Finally fclose to end it. So ... The file *fp4 looks with 0 bytes ever. the other files are not empty but look not completed at all. I see the crash zone about fclose files sentences. Need I do some like a flush before close the files ? Im using windows xp (Of course the program works well in DJGPP) Thanks for any ideas Roberto |
|
From: Ioannis V. <no...@ho...> - 2002-07-24 00:21:21
|
I have posted an email to the list 12 hours ago and no message has arrived to me yet. I am posting this message at 24 July 2002 01:18 GMT. If anyone from the list receives this message please reply. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys |
|
From: Hongli L. <h....@ch...> - 2002-07-23 23:41:28
|
On Wed, 2002-07-24 at 00:35, Hongli Lai wrote: > (Obviously it's a boken installation.) > I mean "broken installation". |
|
From: Hongli L. <h....@ch...> - 2002-07-23 22:30:30
|
On Tue, 2002-07-23 at 22:09, jim nolin wrote: > When I try to compile a file the error I get is "no > such file or directory" regarding the ".h" library. I > have taken advice like looking in the include folder > to see if it was set to C:\Dev-C++\include. This may > sound stupid but I have no Dev-C++ folder. I have a > DevCpp icon and I have an include folder which > contains 4 folders, G++, GI, ObiC, and Sys. All of > these folders are empty. Perhaps I installed something > incorrectly. Please help. Thank You. > ........ I don't know what to say.... Uhm... let's see... the compiler complains about foo.h not found. And you just said that your include folders are all empty. (Obviously it's a boken installation.) |
|
From: <we...@ha...> - 2002-07-23 21:01:45
|
Hi,
I want to flush (delete) a string value from registry.
I tryed to set it to 0 of this mode:
#include <windows.h>
int main(int argc, char *argv[])
{
HKEY hKey;
DWORD dwDisposition;
unsigned char *szBuf = (unsigned char *)strdup("0");
if (RegSetValueEx(HKEY_CURRENT_USER,
"\\Software\\Microsoft\\Security\\say\\", 0, REG_SZ, szBuf,
strlen((char*)szBuf)) != ERROR_SUCCESS)
return 1;
RegCloseKey(hKey);
return 0;
}
But it didn't set the value of:
\\HKEY_CURRENT_USER\\Software\\Microsoft\\Security\\say to "0". It crate a
key \\Software\\Microsoft\\Security\\say in \\HKEY_CURRENT_USER . :P
How to do to is set this value ??
And how to for example delete a key \\Software\\Microsoft\\Security\\say\\
??
Can someone gave examples ?? :)
Thkz and Best Regards.
[ ]'s
|
|
From: jim n. <jim...@ya...> - 2002-07-23 20:09:39
|
When I try to compile a file the error I get is "no such file or directory" regarding the ".h" library. I have taken advice like looking in the include folder to see if it was set to C:\Dev-C++\include. This may sound stupid but I have no Dev-C++ folder. I have a DevCpp icon and I have an include folder which contains 4 folders, G++, GI, ObiC, and Sys. All of these folders are empty. Perhaps I installed something incorrectly. Please help. Thank You. ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca |
|
From: Daniel G. <sp...@ho...> - 2002-07-23 12:52:37
|
Hello all, I want my constructors (default, overloaded, and copy) to throw an exception if they fail. 1) How do I test if the constructor has failed? 2) Is it better to create an Exception class to throw exception objects, rather than throwing strings and integers? 3) Where does the catch block go? In the main function after the object has been created? Or in the constructor body? Many thanks, Daniel _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
|
From: Ioannis V. <no...@ho...> - 2002-07-23 11:47:07
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Matthew Hickson > Sent: Tuesday, July 23, 2002 12:39 AM > To: Dev-C++ Mailing List > Subject: Re: [Dev-C++] Copy Constructors and Overloaded > Assignment Operators > > Yeah, I'd forgotten about that. > > I don't worry about portability that much (my primary language being > proprietary). Time > to change my thinking. > > But, is it safe to say that everything should be okay if this > methodolgy > is used for > in-memory state maintenance? You can store data in files in a portable way using text mode (which occupies much space). If you store in binary mode the file is system dependent, that is that the same program compiled in a different compiler (or even a different version of the same compiler) is not guaranteed to read the data properly. I do not know if it is safe when you use the Win32 API. Are they the same funtions precompiled for all compilers in a dll, or every compiler provides its own version of Win32 API? Anyone who knows please inform us. I am studying .NET, and in .NET the same dll is provided (mscorlib.dll) for every compiler. I guess the same is true for Win32 API. But even if Win32 API facilities are the same for every Windows compiler, the binary file is not portable to other OSes. But the text is (that's why HTML, etc are text). But why use files in the first place. I think it is more convenient (and time efficient) to use "roll-back" variables where you will store the previous values. > Use conditional compilation? (#ifdef, etc.) The ANSI C++ file facilities are enough. > How worried are people about bit problems (i.e. endian-ness cross > platform, like Intel to PowerPC). > > I'd never really stopped to think about it until it came up > ... I forget > where now, but it was an interesting point. > > > My favourite part of lists like this is to throw something > out and see > how the community at large > responds. It usually points out weaknesses, and alternatives. It's > always good! 8-) In summary if you want to use (system-dependent) binary files use the ANSII C++ provided facilities. The code will be portable (compile everywhere but by definition binary files are not portable). Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: <ste...@ge...> - 2002-07-22 22:19:59
|
Hi! Got the latest version of DevCpp a couple of days ago, and I must say... = I'm thrilled that the rebuild-all-function works!! (didn't work in my = last version) Love this prog! :) - Stein Nyg=E5rd - http://null.dk/~stein for(a=3D0, b=3D1; a<b; a++, b++){} |
|
From: Matthew H. <mhi...@sy...> - 2002-07-22 21:47:33
|
Hello, >> Another rule >>to tag on >>to using static members for >>callbacks. >> >> >What do you mean with that? > > As I understand it... callback (particularly in Windows, but other UI toolkits aswell) need to be static class members. It pertains to the implied "this" that is passed to non-static members. Causes a world of difficulty as I understand it. Still trying to figure out some of the techniques for circumventing this. (Not fond of "thunking". How are other people accomplishing this? I've checked out the Reliable Software (?) methodolgy, but it seems a little on the fence between OOP and procedural programming...) >Well i guess you can use a reset() member function with no values stored >in disk. > > True. However, I'd be aiming to restore to a previous state... not necessarily a "blank" initial state. To that end, I'd want to capture a state... and then update it (as changes were accepted by the end user), but allow a fallback to a previous state. The only other... seemingly true OOP solution I see is to have a property method that retains the previous value (saw something like this mentioned in a rogue-like game development newgroup). The only problem being is that it creates a ton of member functions for maintenance. I like simplicity and conciseness in code. Too much code, or too complex code, and it's just a pain to maintain. I'm still experimenting. When I get something worth posting, I'll put it out for public consumption/review 8-). |
|
From: Matthew H. <mhi...@sy...> - 2002-07-22 21:37:21
|
Hello, Abhijit Shylanath wrote: >>Now, speaking of class members, how would you persist state? >> >>In VB (the realm I come from... well, there was Pascal those many >>years ago 8-), I would use a Type (read struct) to hold my data. >>This allows for quick memory copies to restore defaults/back out >>changes... In C++ I can also see it making serialization a little >>easier (convert to a char array/string and dump to disk). >> >> > >This isn't always portable, since many compilers use memory alignment to >optimize access... Consider this: > > Yeah, I'd forgotten about that. I don't worry about portability that much (my primary language being proprietary). Time to change my thinking. But, is it safe to say that everything should be okay if this methodolgy is used for in-memory state maintenance? (Unless I start sharing memory across platforms, I suppose... which isn't extremely likely to happen...8-) >64-bit compiled program. A more portable way to persist is methods such as >saveToDisk() and loadFromDisk(), which read and write each member. This way >you can also change the read/write method to suit the platform... on >Windows, it can use the registry, on Linux the home dir, on DOS a config >file, etc. You could also interface to classes like FooWriter and FooReader, >to which you can pass the struct/class as an argument. > > Use conditional compilation? (#ifdef, etc.) How worried are people about bit problems (i.e. endian-ness cross platform, like Intel to PowerPC). I'd never really stopped to think about it until it came up ... I forget where now, but it was an interesting point. >Hope this helps. > > Yup. My favourite part of lists like this is to throw something out and see how the community at large responds. It usually points out weaknesses, and alternatives. It's always good! 8-) Thanks! |
|
From: Raghunath Marella.S <ms...@ya...> - 2002-07-22 09:17:11
|
Hi there,
I am facing a tricky problem. I have defined a class,
in which there are few funtions written for
implementing multithreading. I have a funtion named
"createThreads_()", which creates few threads. There
is another function declared in the class, "DWORD
WINAPI threadEntry_(LPVOID)". This function pointer
has been passed in the CREATETHREAD(..) call, which is
being raised as an error in VC++ compier.
It gives the error like,
_________________________
error C2664: 'CreateThread' : cannot convert parameter
3 from 'unsigned long (void *)' to 'unsigned long
(__stdcall *)(void *)'
None of the functions with this name in scope
match the target type
________________________
If I use any external function Thread Function(making
it as friend to the class) then compilation is
through, WHICH IS AS EXPECTED.
Similarly, if I make the "threadEntry_(..)" in class
as STATIC and use it in CREATETHREAD(..) call then
also compilation is through. But making STATIC wont
serve my purpose.
I can go ahead with using external function by making
int as friend to the class.
BUT HERE MY CONCERN IS WHY NOT POSSIBLE TO USE A
MEMBER FUNCTION AS THREAD FUNCTION?????
Will anyone pls clarify if you know the reason.
thanks in advance,
regards,
Raghunath Marella
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
|
|
From: <dav...@st...> - 2002-07-22 02:56:23
|
Hi! I have recently started using DEV-C++ and my first project was to port some existing software which compiled with no problem on Borland BCC5.5 compiler to the DEV-C++ platform. I had few problems but here are the two that I found: 1) WINDRES reports the following error from these three lines of RESOUCE code: RESOURCE CODE ~~~~~~~~~~~~~ "?", IDM_ABOUT, ALT "/", IDM_ABOUT, ALT "x", IDM_EXIT, ALT ERROR MSG ~~~~~~~~~ inappropriate modifiers for non-VIRTKEY inappropriate modifiers for non-VIRTKEY inappropriate modifiers for non-VIRTKEY I checked with the Win32 API documentation regarding accelerators and my resource code is correct (I think). I have found that despite the error messages, the resulting .RES file has the correct accelerators but it would be nice to have no errors. 2) In my project, the MAKE produces the following link command: g++.exe ../Source/VlogData.o ../Source/AutoGRNEngine.o ../Source/CComm.o ../Source/ConfigData.o ../Source/DateTime.o ../Source/Dialogs.o ../Source/ImportFiles.o ../Source/LocalDB_Queries.o ../Source/Lot.o ../Source/S2LiveDB_Queries.o ../Source/SendMail.o ../Source/Shipment.o ../Source/ShipmentAck.o ../Source/ShipmentContent.o ../Source/SPN_Queries.o ../Source/UtilityFunctions.o ../Source/AutoGRN.o AutoGRN.res -o "..\AutoGRN.exe" -L"d:/progra~1/Dev-C++/lib" -l"odbc32" -l"wsock32" -I"d:/progra~1/Dev-C++/include" -I"D:/Progra~1/Dev-C++/include/g++-3" -I"d:/progra~1/Dev-C++/include" -I"../Include" -s -mwindows This however generates a 'BAD COMMAND OR FILENAME' error. The problem seems to be the output section: -o "..\AutoGRN.exe" If I change this to -o"..\AutoGRN.exe" (remove the space) then it compiles fine. This is an annoying problem as the purpose of an IDE is to be able to build your .EXE with one interface and no unnecessary manual intervention. Some more features to control the MAKE build into DEV-C++ would be nice. Is it planned? One last point, I spent some time figuring out how to use DEV-C++. It would be nice to have some help package but none came with installation I downloaded (4.9.4.1). I saw some references to a DEVCPP.HLP file on the Internet but couldn't find one. Could you please advise where I can get good help documentation which can be downloaded to the PC. (I am not always in a position to get online docs.) Thanks and regards, David :-> P.S. So far, I am very impressed with DEV-C++. Good work. |
|
From: Ahmad M. <mu...@ho...> - 2002-07-22 01:22:49
|
Hello, i can't compile postgresql and mysql static library (both c and c++ interface) on my windows. does dev-cpp have that package to download ?. |
|
From: Abhijit S. <mu...@gm...> - 2002-07-21 14:57:03
|
The '++' character in the Dev-C++ default install directory (C:\Dev-C++) trips up installs and makes which call 'copy'(which treats + as a special command). I suggest that it be changed to C:\Dev-Cpp, or, even better, C:\Dev_Cpp. -------------------------- Checked with NAV 2002 http://mudeth.tripod.com |