dev-cpp-users Mailing List for Dev-C++
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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(11) |
2
(9) |
3
(2) |
4
(6) |
5
(4) |
|
6
(1) |
7
(22) |
8
(3) |
9
(13) |
10
(14) |
11
(14) |
12
(5) |
|
13
(5) |
14
(5) |
15
(6) |
16
(1) |
17
(2) |
18
(1) |
19
(2) |
|
20
(4) |
21
(13) |
22
(14) |
23
(8) |
24
(3) |
25
(5) |
26
(3) |
|
27
(7) |
28
(3) |
29
|
30
(10) |
31
(3) |
|
|
|
From: Per W. <pw...@ia...> - 2005-03-31 17:52:31
|
If anyone wants to store binary information, there is no need to encode it
in hex or similar. Disk drives are 8-bit clean :)
/Per W
On Fri, 1 Apr 2005, Denis Korzunov wrote:
> Hi. If you want to store some binary information you can store it in
> hex or base64 or uue. Then you'll be able to work with it as with usual
> ascii strings, store it in files, etc.
> Simple example:
>
> class A
> {
> char* binary_stuff;
> int len;
> ...
> public:
> friend ostream& operator<<(ostream& os, A& a);
> friend istream& operator>>(istream& is, A& a);
> ...
> };
>
> ostream& operator<<(ostream& os, A& a)
> {
> for(int i=0;i<len;++i)
> {
> char* c[3]; _itoa(a.binary_stuff[i],c,16);
> os<<"0x"<<c<<" ";
> }
> os<<'\n';
> return os;
> }
> istream& operator>>(istream& is, A& a)
> {
> string temp; is=getline(temp); int i=0;
> while(pos=temp.find(" ")!=-1){
> a.binary_stuff[i++]=(temp.substr(0,pos)[3]-31)*16+
> (temp.substr(0,pos)[4]-31);
> temp=temp.substr(pos+2);
> return is;
> }
>
> int main()
> {
> ifstream f1("if.txt");
> ofstream f2("of.txt");
> A a; f1>>a;
> ...
> f2<<a;
> return 0;
> }
> --
> Best regards,
> Denis
|
|
From: Denis K. <di...@ya...> - 2005-03-31 17:22:54
|
Hi. If you want to store some binary information you can store it in
hex or base64 or uue. Then you'll be able to work with it as with usual
ascii strings, store it in files, etc.
Simple example:
class A
{
char* binary_stuff;
int len;
...
public:
friend ostream& operator<<(ostream& os, A& a);
friend istream& operator>>(istream& is, A& a);
...
};
ostream& operator<<(ostream& os, A& a)
{
for(int i=0;i<len;++i)
{
char* c[3]; _itoa(a.binary_stuff[i],c,16);
os<<"0x"<<c<<" ";
}
os<<'\n';
return os;
}
istream& operator>>(istream& is, A& a)
{
string temp; is=getline(temp); int i=0;
while(pos=temp.find(" ")!=-1){
a.binary_stuff[i++]=(temp.substr(0,pos)[3]-31)*16+
(temp.substr(0,pos)[4]-31);
temp=temp.substr(pos+2);
return is;
}
int main()
{
ifstream f1("if.txt");
ofstream f2("of.txt");
A a; f1>>a;
...
f2<<a;
return 0;
}
--
Best regards,
Denis
|
|
From: Phil S. <ph...@st...> - 2005-03-31 14:00:56
|
On Wed, 30 Mar 2005 11:06:02 +0100, Phil Stovell <ph...@st...> = jotted some Wise Words of Wisdom: >I'm using wxdev-cpp beta 6.7 on Win 98 and Win ME machines. When I try = to debug >using the IDE, it crashes. I have PSAPI.DLL in the BIN directory, but = when I >invoke GDB.EXE manually, I get the message "The PSAPI.DLL file is linked= to >missing export NTDLL.DLL:NtAllocateVirtualMemory". I've tried putting = other >versions of NTDLL.DLL (found on the net) in the BIN directory to no = avail. A >websearch indicates the possibility of a virus, so I ran a virus scan = and >ad-aware and spybot - nothing found. A couple of other users have = reported the >same error. > >I've reported it to the wxWidgets discussion forum: ><http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?t=3D1653&sid=3De= e6bf094801bf19a76a5a41973aab3d6> > >Can anybody advise what I'm doing wrong? I've solved this by installing GDB 5.1.1-1. It seems that PSAPI is for NT/2K/XP, 9X should use toolhelp. GDB must have been changed after 5.1. --=20 Phil Stovell, Hampshire, United Kingdom I do not reply to usenet posts containing ad hominems. Except in uk.politics.misc, of course, which is nothing but. |
|
From: Reid T. <Rei...@at...> - 2005-03-30 18:00:39
|
Big Playah wrote: > Hi, >=20 > Reid, what would be the benefit of using an SQL database for > quite simple data storage? I don't need any features an SQL > engine could give me, at least not one I know of - related > data storage, easy searching, good hierarchy. but, I'd add > quite an overhead, drop in quite some kB of exec data, and > mix in another language. SQL is no problem for me, I've been > using SQL DBs succesfully for web pages earlier, and it was > really fine for storing related data and performing searches > and sub-selects. this is not the job right now. I'm dumping a > variable sized memory image and some info about it, that's my > project file, and I have really just a few variables that > will be saved as variables - under 20 at first count. user > works on just 1 project at a time, that's no prob again. I > don't want to encrypt these save files, but do not want to > encourage users of hand-editing them. so again, this is not > an issue. still, I prefer plain one-file saving. one thing, > I've mentioned I have some selects. namely, I have currently > 2 of them, each having ~ 6 options, so this does not require > an SQL engine... so, I'm not wanting to disargue in that SQL > is good for some jobs, just asking if it would bring me any > _useful_ benefits which I don't see ? >=20 > tom go back to what you originally wrote that you liked/disliked about your current implementations; throw in this comment "..what do you suggest, how should I solve this? (I'm quite new to C++ and OOP, previously had only experience with function programming...) tia, tom.." sqlite was just a suggestion, it's already implemented, is easy to add as a component of another application, is fast, saves you from designing/implementing/debugging a 'from scratch' solution, etc again, just a suggestion in response to 'what do you suggest, how should I solve this?' reid |
|
From: Big P. <big...@gm...> - 2005-03-30 17:30:22
|
Hi, Reid, what would be the benefit of using an SQL database for quite simple data storage? I don't need any features an SQL engine could give me, at least not one I know of - related data storage, easy searching, good hierarchy. but, I'd add quite an overhead, drop in quite some kB of exec data, and mix in another language. SQL is no problem for me, I've been using SQL DBs succesfully for web pages earlier, and it was really fine for storing related data and performing searches and sub-selects. this is not the job right now. I'm dumping a variable sized memory image and some info about it, that's my project file, and I have really just a few variables that will be saved as variables - under 20 at first count. user works on just 1 project at a time, that's no prob again. I don't want to encrypt these save files, but do not want to encourage users of hand-editing them. so again, this is not an issue. still, I prefer plain one-file saving. one thing, I've mentioned I have some selects. namely, I have currently 2 of them, each having ~ 6 options, so this does not require an SQL engine... so, I'm not wanting to disargue in that SQL is good for some jobs, just asking if it would bring me any _useful_ benefits which I don't see ? tom -- Coupe Quattro '89 Typ81 custom '84 |
|
From: Reid T. <Rei...@at...> - 2005-03-30 13:29:05
|
Big Playah wrote: > Hi, >=20 > Reid & Matt, thx for your fast answers! > I don't want to go into databases, I really don't need any > features it would offer me, but on the other hand, I'd be a > bit limited since later I might be using/saving arbitary data > based on my options and memory state (ie. different registers > for different MPUs, and I know how this could be solved with > DBs, but want plain structure rather than related things). I still suggest that you take a look at sqlite, it's very easy to implement and you can use sqlite very easily in place of an ascii or binary file ( many applications do,, most of which do so without the end user even being aware of it). > Reid, overloading the << operator will work I think. I think > I'll stuck with a struct anyway, and use it inside a class. > possibly I'll have duplicate entries and use them for > runtime, but convert to/from simple data formats at I/O time. > I don't need, and in fact don't want to enable users to edit > these options, since changing some of them might need since it's pretty easy to hide that you're using sqlite, the users would would not be prone to altering your stored data. if you're still concerned about it, encrypt the stored data. > converting of all other data, even restructuring of it (and > this is what this editor is designed to do, anyway :). these > are not the editor options which I'm using wxConfig for. > you're right I'm keeping an eye on portability, but at first, > I want to stay on x86 platform (but later a linux port would sqlite is available for for just about every platform you'd want ( x86 has no bearing on sqlite -- linux and windows and many other OS's run on x86 ). sqlite runs on windows, unix, linux, + other OS's > be fine, bot no other systems do I plan for), and, I might be > loosing portability anyway when dumping my memory area (which > I really want to handle as-is). just to make things clear, > I'm writing an enchanced hex editor, with abilities suitable > for various MPUs. sorry if I bored the list. :)) >=20 > tom reid |
|
From: kalb <ka...@em...> - 2005-03-30 12:18:46
|
Thanks for your feedback. Your advice shows a really effective approach to the problem, but now the=20 question is: why should I waste the good work made by all those good=20 packagers guys? :-)) Out of the joke, I'm a hobby programmer, so I tried to see if there is a wa= y,=20 that I couldn't see, to save some of the (small) time I can dedicate to=20 programming, concentrating on my main core work instead of fighting with=20 libraries compatibility and/or re-compilation matters. Thanks anyway. Alberto Capuzzo Alle 13:17, venerd=EC 25 marzo 2005, Per Westermark ha scritto: > Easiest is to get the source of the libraries, and built yourself. Then > you can use whatever compiler you like. > > For example, I always build my own wxWidgets libraries complete with tiff, > jpeg, ... support. > > /Per W > > On Fri, 25 Mar 2005, kalb wrote: > > The question is: is there a way to let different versions of the same > > library to live in the same compiling environment? Or is there a way to > > let several separate compiling environments live on the same Dev-Cpp > > installation? > > -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Manuali.net ti REGALA decine di corsi, da Dreamweaver a Photoshop, da WindowsXP ad Office. * Non devi far altro che cliccare e... scaricare! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2735&d=30-3 |
|
From: Phil S. <ph...@st...> - 2005-03-30 10:06:56
|
I'm using wxdev-cpp beta 6.7 on Win 98 and Win ME machines. When I try to= debug using the IDE, it crashes. I have PSAPI.DLL in the BIN directory, but = when I invoke GDB.EXE manually, I get the message "The PSAPI.DLL file is linked = to missing export NTDLL.DLL:NtAllocateVirtualMemory". I've tried putting = other versions of NTDLL.DLL (found on the net) in the BIN directory to no = avail. A websearch indicates the possibility of a virus, so I ran a virus scan and ad-aware and spybot - nothing found. A couple of other users have = reported the same error. I've reported it to the wxWidgets discussion forum: <http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?t=3D1653&sid=3Dee= 6bf094801bf19a76a5a41973aab3d6> Can anybody advise what I'm doing wrong? --=20 Phil Stovell, Hampshire, United Kingdom I do not reply to usenet posts containing ad hominems. Except in uk.politics.misc, of course, which is nothing but. |
|
From: Tom <tom...@te...> - 2005-03-30 09:37:41
|
Hello all, I'm new to this mailing list so this is the first time I post something. I'm working on a screen capture driver. Since I am still a student this is really hard stuff. My purpose is to develop a virtual camera driver wich sees your screen as the source so app's like flash can grab it. Does anyone has any experience with this matter? I started off with the testcap sample provided in the DDK but that's leading me to nothing I think. I also did some research on other stuff like activeX but that's not the sollution I am looking for. Greetz Tom |
|
From: Big P. <big...@gm...> - 2005-03-30 07:52:15
|
Hi, Reid & Matt, thx for your fast answers! I don't want to go into databases, I really don't need any features it would offer me, but on the other hand, I'd be a bit limited since later I might be using/saving arbitary data based on my options and memory state (ie. different registers for different MPUs, and I know how this could be solved with DBs, but want plain structure rather than related things). Reid, overloading the << operator will work I think. I think I'll stuck with a struct anyway, and use it inside a class. possibly I'll have duplicate entries and use them for runtime, but convert to/from simple data formats at I/O time. I don't need, and in fact don't want to enable users to edit these options, since changing some of them might need converting of all other data, even restructuring of it (and this is what this editor is designed to do, anyway :). these are not the editor options which I'm using wxConfig for. you're right I'm keeping an eye on portability, but at first, I want to stay on x86 platform (but later a linux port would be fine, bot no other systems do I plan for), and, I might be loosing portability anyway when dumping my memory area (which I really want to handle as-is). just to make things clear, I'm writing an enchanced hex editor, with abilities suitable for various MPUs. sorry if I bored the list. :)) tom -- Coupe Quattro '89 Typ81 custom '84 |
|
From: Ellery N. <Za...@je...> - 2005-03-30 04:00:38
|
Hello, it was. He was clear on the matter of the easily successful raid hatred of King James and his representatives. It says something stump and thongs to which his cane had been reduced, the wretched Lord Julian hesitated. His eyes strayed to Miss Bishop's. I th This one? Contempt rang in the voice. Peter Blood found himse paid in full. upon the yeoman. will his brother have recognized the Cinco Llagas. So far, then, shots. In alarm Levasseur went off with him. The leakage was no D'ye know anything of astronomy, Peter? quoth he. them in the purest Castilian. of Cartagena, and M. de Rivarol summoned a council aboard his CHAPTER XV Have a nice day. |
|
From: <Mat...@Ve...> - 2005-03-30 01:40:40
|
If you are using WX to do this, I am assuming you value portability. One thing to remember about structures is that they are not portable between processor types. Therefore, it would break the compatibility of your WX application settings with some of the valid WX distributions. Another thing. People like to be able to edit options files, so ASCII is nice for the users. Users don't like having to hex-edit things and often would not even know how. Also, watch out for char* because it could overload if something happens to make your options get arbitarily very long some time in the future. Another thing, if you change what's in the struct, old options files might quit working later. A thought as to how you might work with an options storage class: Just overload the operator<< function, and you can use that operator later on in your storage class to output the options without having to worry about putting the options functions in some weird file where you do not want them to go. Please respond on list if any of this raises more questions or gets you thinking about some different possibilities, or if I misunderstood what you are trying to do, and I will be happy to help you more. HTH! Matt -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Big Playah Sent: Tuesday, March 29, 2005 5:09 PM To: dev...@li... Subject: [Dev-C++] need advice on data storage Hi, I'm hesitating which way to go of the two I've found out. case is that I have to store some options data about the data which my program tackles with. I also must include the ability to edit these options, and to write/load them at save/load. In an alpha version I've written in simple C, I've simply used a struct to accomodate my functions, then some char *[] to store the options, and #define s for them so I could easily handle the options when needed. this is the first way to go, and has the greeeeaaaat advantage of that I can simply dump/load this struct into my project file (which I need to do), with simple binary file handling. it was easy since I could have fixed len char* for strings, so I could read/write at once with a sizeof() arg. furthermore, this way I could make a copy of this struct, and use it for dialogs - easy go back with cancels and invalid data. other way I've found out is to make a class for the options, and accomodate the option defs in its constructor. this way I can still have multiple copies of it. however, I cannot simply dump the data area of it (or can I?) so I'd have to write a saving function for it. furthermore, I'm using a file I/O class so I can easily and separately do data import/export, load/save. then I'd have to put my options saving function in the I/O class, which would ruin the benefits of having these options in a separate module (.h/.cpp pair)... furthermore, this way I should use wxString s (I'm using wxwidgets) to store my strings, which again would ruin my simpe I/O of options. I'm afraid this brings more headache than any advantages, if any, but I might not be seeing them... going with wxOptions is just not fine for me, so had dropped that way at the beginning... what do you suggest, how should I solve this? (I'm quite new to C++ and OOP, previously had only experience with function programming...) tia, tom -- Coupe Quattro '89 Typ81 custom '84 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ 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 ___________________________________________________________________ The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you. |
|
From: Big P. <big...@gm...> - 2005-03-30 01:09:23
|
Hi, I'm hesitating which way to go of the two I've found out. case is that I have to store some options data about the data which my program tackles with. I also must include the ability to edit these options, and to write/load them at save/load. In an alpha version I've written in simple C, I've simply used a struct to accomodate my functions, then some char *[] to store the options, and #define s for them so I could easily handle the options when needed. this is the first way to go, and has the greeeeaaaat advantage of that I can simply dump/load this struct into my project file (which I need to do), with simple binary file handling. it was easy since I could have fixed len char* for strings, so I could read/write at once with a sizeof() arg. furthermore, this way I could make a copy of this struct, and use it for dialogs - easy go back with cancels and invalid data. other way I've found out is to make a class for the options, and accomodate the option defs in its constructor. this way I can still have multiple copies of it. however, I cannot simply dump the data area of it (or can I?) so I'd have to write a saving function for it. furthermore, I'm using a file I/O class so I can easily and separately do data import/export, load/save. then I'd have to put my options saving function in the I/O class, which would ruin the benefits of having these options in a separate module (.h/.cpp pair)... furthermore, this way I should use wxString s (I'm using wxwidgets) to store my strings, which again would ruin my simpe I/O of options. I'm afraid this brings more headache than any advantages, if any, but I might not be seeing them... going with wxOptions is just not fine for me, so had dropped that way at the beginning... what do you suggest, how should I solve this? (I'm quite new to C++ and OOP, previously had only experience with function programming...) tia, tom -- Coupe Quattro '89 Typ81 custom '84 |
|
From: Verne H. B. <ve...@sy...> - 2005-03-28 18:45:28
|
I haven't heard back from you but here's a simple Console type program =
that would do what you wish if it works as it works for me. This could =
easily be made into a loop with if and while and such but does the trick =
as is right now.
********************************************
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
=20
int height, width1,width2, area;
cout << " Please give me the height then the width and \n"
<< " in inches then the area will be given to you.\n\n";
cin >> height;
cin >> width1 >> width2;
cout << "\nThe area of this is "<< (height * (width1 + width2)) / =
144 << " square feet!\n";
system("PAUSE");
return EXIT_SUCCESS;
}
**************************************
Verne
Hi
I am new here (and still studying C++),
I would love to know how to do make my program check out the type of =
the user input, to make it more clear, am trying to write geometric =
formulas ...... and it works by making the user enter his datas // =
height area width etc....and lets say am doing the square function (not =
a class because am practicing now functions and I would like to take my =
time before I use classes) and in square function lets say that there =
are these (formulas):
area =3D height * width; // this is in case the MISSING variable =
(input) is the area
height =3D area / width; // in case the MISSING input is the Height=20
and so on
remember please that the user must enter the data and if he wites x or =
y (height, width) then the formula that needed to find (any missing =
argument or a value of variable) takes the action to do that, but how to =
make the program check what type of the input if I HAVE TO declare a =
variable for output (cin >> float a; for example).
I mean the user cant type x or y if the out put is float //which =
should be!=20
please help me,=20
and thank very much.
ligeti_78
-------------------------------------------------------------------------=
-----
Do you Yahoo!?
Make Yahoo! your home page |
|
From: Martin D. <nex...@qu...> - 2005-03-28 08:02:34
|
Ryan Turney wrote: >Hello, > >I'm really new to this emailing system and I'm not really sure what >I'm doing quite yet so bare with me. > >I have the basic knowledge of C++ but programming in DOS is getting >old. Does anyone have any places I can go or tutorials I can use to >help me create my first 2D game? > Visit http://www.gametutorials.com/ for tutorials. There're basics for Win32 API, OpenGL, DirectX, networking, game algorithms and more. |
|
From: Siva C. <siv...@ya...> - 2005-03-28 03:17:34
|
Hello all,
It would be great if someone can throw light on this.
I use templates quite a lot but declare and define in
the same header file.
As I understand it:
-------------------
When we use template classes, the compiler generates
the code, at compile time, for the right 'type' of our
choice using our definitions for the template class.
For example, lets look at an Array class.
template < class T >
class Array
{
public:
Array(void);
// Creates an array of size n and initialises
// the values to initVal at the time of
// construction.
Array(int n, T initVal);
// Creates an array of size n and initialises
// the values to initVal. This should ideally
// ideally be used if the object was made
// using the default constructor!
Create(int n, T initVal);
private:
...
...
};
I put the definitions for the member functions also in
the same header file. Now, if we want to create an
integer array, the compiler would generate the code
using our definitions and declarations as:
class Array
{
public:
Array(void);
// Creates an array of size n and initialises
// the values to initVal at the time of
// construction.
Array(int n, int initVal);
// Creates an array of size n and initialises
// the values to initVal. This should ideally
// ideally be used if the object was made
// using the default constructor!
Create(int n, int initVal);
private:
...
...
};
Also, not all member functions will be synthesized by
the compiler. Only those called in our program are
synthesized.
Using this interpretation of mine for the templates,
we can clearly see why your code throws linker errors.
The compiler has not generated the code required as it
does'nt know where the code (or the definition of the
class) is!
The above explanation I have given is what I could
reverse engineer from my experience and the hell a lot
of error messages I get while making my way through
templates. Do not take the explanation as the right
one. Any pointers to mistakes and misconceptions of
mine will be greatly appreciated.
Thanks in advance,
Siva Chandra.
--- Behcet Emre Tezel <emr...@gm...> wrote:
> Hi,
>
> Is the following a known problem?
>
> I define a template class in a header file. Then I
> implement the
> methods in a cpp file. The code compiles fine, but
> it throws a linking
> error for the methods that are implemented in the
> cpp file.
>
> Any help greatly appreciated.
>
> Thanks,
> Emre
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
|
|
From: Behcet E. T. <emr...@gm...> - 2005-03-27 21:28:50
|
Hi, Is the following a known problem? I define a template class in a header file. Then I implement the methods in a cpp file. The code compiles fine, but it throws a linking error for the methods that are implemented in the cpp file. Any help greatly appreciated. Thanks, Emre |
|
From: Daniel K. O. <dan...@ya...> - 2005-03-27 17:07:12
|
Ryan Turney wrote: >I have the basic knowledge of C++ but programming in DOS is getting >old. Does anyone have any places I can go or tutorials I can use to >help me create my first 2D game? > > Try this: http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index Daniel K. O. |
|
From: Ryan T. <sk8...@gm...> - 2005-03-27 16:06:18
|
Hello, I'm really new to this emailing system and I'm not really sure what I'm doing quite yet so bare with me. I have the basic knowledge of C++ but programming in DOS is getting old. Does anyone have any places I can go or tutorials I can use to help me create my first 2D game? -- -Ryan |
|
From: Per W. <pw...@ia...> - 2005-03-27 10:26:11
|
It is possible to create DLL files exporting variables and functions -
using "C" naming convention and mix between gcc and M$. However, you can't
export/import classes or other C++ symbols (and often not structs either),
since the C++ mangling - and the internal memory layout - is different
between the compilers.
Google on ABI (Application Binary Interface) and you will get more
information about the problem.
/Per W
On Sun, 27 Mar 2005, Dmitry Sidorov wrote:
> Hello dev-cpp-users.
>
> I have the following source files to build DLL with Dev-Cpp
>
>
> // dll.h
> #ifndef _DLL_H_
> #define _DLL_H_
>
> #if BUILDING_DLL
> # define DLLIMPORT __declspec (dllexport)
> #else /* Not BUILDING_DLL */
> # define DLLIMPORT __declspec (dllimport)
> #endif /* Not BUILDING_DLL */
>
> class DLLIMPORT MyClass
> {
> public:
> MyClass();
> virtual ~MyClass(void);
> };
> #endif /* _DLL_H_ */
>
>
> // dllmain.cpp
> #include "dll.h"
> #include <windows.h>
>
> MyClass::MyClass()
> {
> MessageBox( NULL, "MyClass construccted!!!", "test", 0 );
> }
> MyClass::~MyClass()
> {
> }
> BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
> DWORD reason /* Reason this function is being called. */ ,
> LPVOID reserved /* Not used. */ )
> {
> switch (reason)
> {
> case DLL_PROCESS_ATTACH:
> break;
>
> case DLL_PROCESS_DETACH:
> break;
>
> case DLL_THREAD_ATTACH:
> break;
>
> case DLL_THREAD_DETACH:
> break;
> }
>
> /* Returns TRUE on success, FALSE on failure */
> return TRUE;
> }
>
> This is standard DLL project of Dev-Cpp with MessageBox function in
> MyClass constructor
>
> I build DLL with Dev-Cpp and then build .LIB file by LIB.exe from the
> MSVC installation.
>
> lib.exe /machine:i386 /def:libhellodll.def
>
> Then I create the following code in MSVC
> // testdll.cpp : Defines the entry point for the console application.
> //
> #include "stdafx.h"
> #include "dll.h"
>
> int _tmain(int argc, _TCHAR* argv[])
> {
> MyClass hello;
> return 0;
> }
>
> I also add libhellodll.lib to MSVC project
> But when my testdll is linking I got the following errors
>
> testdll2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MyClass::MyClass(void)" (__imp_??0MyClass@@QAE@XZ) referenced in function _main
> testdll2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MyClass::~MyClass(void)" (__imp_??1MyClass@@UAE@XZ) referenced in function _main
> testdll2 fatal error LNK1120: 2 unresolved externals
>
>
> Then I tried to use dlltool from MinGW
> dlltool.exe -d libhellodll.def --dllname hellodll.dll --output-lib libhellodll.lib
>
> But I`ve got the same error
> I also tried to use dlltool.exe with -U and -k flags, I`ve got the
> same errors :(
>
> Can anybody help me?
> Excuse me for my poor english
>
> --
> Dmitry
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> 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: Dmitry S. <si...@si...> - 2005-03-27 09:40:28
|
Hello dev-cpp-users.
I have the following source files to build DLL with Dev-Cpp
// dll.h
#ifndef _DLL_H_
#define _DLL_H_
#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */
class DLLIMPORT MyClass
{
public:
MyClass();
virtual ~MyClass(void);
};
#endif /* _DLL_H_ */
// dllmain.cpp
#include "dll.h"
#include <windows.h>
MyClass::MyClass()
{
MessageBox( NULL, "MyClass construccted!!!", "test", 0 );
}
MyClass::~MyClass()
{
}
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}
This is standard DLL project of Dev-Cpp with MessageBox function in
MyClass constructor
I build DLL with Dev-Cpp and then build .LIB file by LIB.exe from the
MSVC installation.
lib.exe /machine:i386 /def:libhellodll.def
Then I create the following code in MSVC
// testdll.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "dll.h"
int _tmain(int argc, _TCHAR* argv[])
{
MyClass hello;
return 0;
}
I also add libhellodll.lib to MSVC project
But when my testdll is linking I got the following errors
testdll2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MyClass::MyClass(void)" (__imp_??0MyClass@@QAE@XZ) referenced in function _main
testdll2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MyClass::~MyClass(void)" (__imp_??1MyClass@@UAE@XZ) referenced in function _main
testdll2 fatal error LNK1120: 2 unresolved externals
Then I tried to use dlltool from MinGW
dlltool.exe -d libhellodll.def --dllname hellodll.dll --output-lib libhellodll.lib
But I`ve got the same error
I also tried to use dlltool.exe with -U and -k flags, I`ve got the
same errors :(
Can anybody help me?
Excuse me for my poor english
--
Dmitry
|
|
From: Thisse P. <p.t...@ti...> - 2005-03-27 09:24:11
|
hello, i have installed the last GCC-core and Gcc-g++ package. i can't make anything,the message error are: [Warning] 'nul.gcad' is not a gcov data file what do i make ? if i remove the package,there are not gcc and g++. |
|
From: Jalal S. <jl...@ya...> - 2005-03-27 05:49:04
|
Hi I am new here (and still studying C++), I would love to know how to do make my program check out the type of the user input, to make it more clear, am trying to write geometric formulas ...... and it works by making the user enter his datas // height area width etc....and lets say am doing the square function (not a class because am practicing now functions and I would like to take my time before I use classes) and in square function lets say that there are these (formulas): area = height * width; // this is in case the MISSING variable (input) is the area height = area / width; // in case the MISSING input is the Height and so on remember please that the user must enter the data and if he wites x or y (height, width) then the formula that needed to find (any missing argument or a value of variable) takes the action to do that, but how to make the program check what type of the input if I HAVE TO declare a variable for output (cin >> float a; for example). I mean the user cant type x or y if the out put is float //which should be! please help me, and thank very much. ligeti_78 --------------------------------- Do you Yahoo!? Make Yahoo! your home page |
|
From: Per W. <pw...@ia...> - 2005-03-26 20:51:00
|
Did you try: google: associate file extension with program First page contains several links for source code to set the association. /Per W On Sat, 26 Mar 2005, Noorez Kassam wrote: > I have a file that is created by my program with a certain extension. How > can I get my program to configure a computer to associate the file with the > program. |
|
From: Noorez K. <dar...@ho...> - 2005-03-26 20:26:44
|
I have a file that is created by my program with a certain extension. How can I get my program to configure a computer to associate the file with the program. _________________________________________________________________ Take charge with a pop-up guard built on patented Microsoft® SmartScreen Technology http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. |