|
Ok so here is the situation,
I had an assignment due in my class(Don't Worry it is over now, however I had to turn it in incomplete) I want to finish it up for the learning experience my class is a 100 level class at my college and it is programming in C++.
Here is the link: Assignment BIGINT
Now I have finished some of it and commented most of it so hopefully it will be easy to understand where I am.
Class Definition:Class Definition
Class Inplementation:Implemenation
The main point of this assigment was operator overloading and I need to get +, -, *, / ++, --, +=, -=, ==, !, >, < overloaded.
Now I know that this is a large amount of work, however I was hoping we could work at this one step at a time and I would appreciate this an extreme amount. Thanks Alot Guys
-Duncan
|
|
|
|
|
ask for a specific question first, and only then, you'll get some help. if people feel you ask them to do the job for you, no one will come.
then, the first problem is ...?
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Ok Well to be specific I have been working on it the last two days, I really need help with
* & / I am sure that if I get these I will have no problem with the rest of it.
ALSO I have updated the class and class implementation with what I finished last night. Added material includes:
Constructors all complete.
+=(Although it uses + operator)
-=(Also uses - operater)
==, !=, <, >
and negative -(unary -)
Check the Links Thanks Again Guys
|
|
|
|
|
I have all the function define now need to call function with parameter????
So i need to create an instance of an 'CArielAPI' object.????HOW????
-- modified at 22:01 Thursday 20th July, 2006
|
|
|
|
|
How long have you been writing code for ? This is a very confusing question, because the answer seems to be so simple. Assuming that CArielAPI is a class, you need to include the header it was defined in so it's visible where you want to create it, then you just plain declare it.
Perhaps you need to explain some more ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
priyanka s wrote: 'CArielAPI' object.????HOW????
CArielAPI ArielObj;
ArielObj.Call it funtion!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi!
Reading the memory in other applications can be quite useful sometimes. It is especially useful for writing trainers.
Now, I have successfully located a couple of variables in my target application. Those variables are mostly strings allocated directly on the stack or through a call to malloc with a constant length. These constant allocations yields constant addresses for my strings. Thus, they can easily be read from my trainer-application using ReadProcessMemory.
However, when I use dynamic memory allocation the offsets between my variables can be of any size. I need to somehow calculate exactly where in the memory my variables will be located. Also, it would be good to know how many bytes one should read (the length of allocated strings etc).
How can I do that? Note that I'm only interested in _reading_ these values. I know there are ASM/Soft-Ice gurus in here! Could you please point me in the right direction =)
Any help is appreciated!
Thanks!
/Chris
|
|
|
|
|
|
using SetupDiXxx functions:
I have got a DevicePath
\\?\usbstor#disk&ven_fujitsu&prod_memorybird&rev_1.14#0739035033a1&0#{53f563
07-b6bf-11d0-94f2-00a0c91efb8b}.
then use function GetLogicalDrives get all removable drives : A:\, I:\.
Then I feed all these removable drive mountpoint to function
GetVolumeNameForVolumeMountPoint
but the volumeName returned from the function:
\\?\Volume{84ec96be-1682-11db-8e5c-001111c4d88f}
doesn't match with the device path.
So how can I determine which removable drive in the list is the one for the USB flash drive??? I need exact drive letter for the USB flash drive plugged into the PC in order to access files stored in it.
|
|
|
|
|
Greetings,
Is it acceptable or good programming practice to have vectors nested inside each other within one big vector? For example, say I wanted to record inquiries for a business. Say there were only six type of inquiries and, of course, they can occur in one of 12 months, and each month has 30 or so days.
Is it ok to put an object call m_inqInquiry into a vector m_vDays into a vector m_vMonths, then put m_vMonths into a vector call m_vInquiries.
This proposed system would work as follows when a new inquire is created: The m_vInquiries would find the appropriate month vector based on the current month, then in the appropriate m_vMonths vector it would find the appropriate m_vDays vector, then in the particular day m_vDays vector it would add an m_inqInquiry object.
Is that consider bad practice? Is it ok to add more nested levels?
Thanks in advance,
BP
|
|
|
|
|
BlitzPackage wrote: Is it acceptable or good programming practice to have vectors nested inside each other within one big vector?
in general, i don't see why not. sometimes that's simply what the solution requires.
your specific case sounds OK. though, most people would probably just shove all that data into a database and let SQL handle picking out the correct Inquiries.
Do the chickens have large talons?
|
|
|
|
|
Thank you very much for your answer, I appreciate that. I would use SQL or SQLite, but there might be a substantial comment section which would contain the observations (i.e. at least several paragraphs). So my plan was to store it in a CString variable. I am not sure if SQL or SQL lite can do hold that much information in a field. What do you think?
Thanks again for your answer.
BP
|
|
|
|
|
BlitzPackage wrote: I am not sure if SQL or SQL lite can do hold that much information in a field. What do you think?
It's only limited by disk space.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
yeah, SQL can handle it. a "varchar" can store just over 8000 chars. but the "text" data type can hold something like 2MB worth.
Do the chickens have large talons?
|
|
|
|
|
Wow!!!! I did not know that, this has the potential to radically change the entire design of my software. I am soooo excited! I always thought that such databases could only handle about 250 characters or something in a text field. I guess I just deduced that from using MS Access. My last question: within the comment field, is it possible to store format variablse (i.e. paragraph indentation, a double carriage return for spacing, etc...)? If it's possible I'll find out how I just need to know if that's possible and the direction to look to.
Thanks again,
BP
|
|
|
|
|
SQLServer (Access too) can hold anything a CString can: whitespace, CR/LF, etc..
Do the chickens have large talons?
|
|
|
|
|
Can we use the alphablend API to create a transparent brush?
(The brush is createed from a bitmap pattern using CreatePatternBrush())
|
|
|
|
|
I'm getting the handle of a MFC app with FindWindow and I can send messages to it's main window, but I would like to send a WM_COMMAND message with an ID that is currently disabled in the app.
The problem is that MFC catches such messages. Is it possible to either override the update handlers of an other app or force a WM_COMMAND message?
Thanks
|
|
|
|
|
ABuenger wrote: he problem is that MFC catches such messages. Is it possible to either override the update handlers of an other app or force a WM_COMMAND message?
IMHO, This is little Difficult, you have hook that Window for the Message.. you can overide update functionality for that Control!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ABuenger wrote: he problem is that MFC catches such messages. Is it possible to either override the update handlers of an other app or force a WM_COMMAND message?
Sorry you cannot hook that Update Function.. as MFC itself post that message!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I've just finished the first pass on Lippman fourth edition. The best intro to C++ that I have read out of four or five books. I think that I actually am starting to understand this stuff. I'm currently reading Llopis "C++ for Game Programmers" that I picked up cheap and then I plan to re-read Lippman and do all the exercises next.
What book would you guys recommend for C++ and Game Programming after that?
My ideal book on C++ and Game Programming would include:
* not too much basic cpp stuff
* strong on game design preferably for FPS / strategy / RPG / RTS / Space Games (X2, X3 & Freelancer clones)
* strong on C++ not C (La Mothe is great but it's more C than C++)
* lots of code
* extended examples
* interfacing with engines: Q3, Crystal Space, whatever
Okay, that may be a tall order, but is there anything that even comes close? has some of the above?
|
|
|
|
|
brett54321 wrote: * strong on C++ not C (La Mothe is great but it's more C than C++)
Effective C++ by Scott Meyers
|
|
|
|
|
You might get more out of writing some code.
earl
|
|
|
|
|
brett54321 wrote: strong on C++ not C (La Mothe is great but it's more C than C++)
'The C++ Programming language' by Bjarne Stroustrup. I'd frankly not trust any other book to teach C++ instead of C, especially when it comes to strings, etc.
You should be doing the exercises on the first pass, IMO.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
'Lo again
thanks for the replies. I'm def. planning on doing all the exercises in Lippman next time round (in a couple of days) - I did do them for the first few chapters.
Meyers and Stroustrup are on my list of recommended books so I'll check them out in Waterstones.
I think for now that I'll finish Llopis, reread Lippman and do all the exercises, then take it from there. Prob. start writing some code
cheers...
|
|
|
|