These, "Hey, you do not have anything better to do, write my program for me!", kinds of threads always make me chuckle. What a better way to learn then do nothing and have someone else do all the...
Type: Posts; User: HyperShadow
These, "Hey, you do not have anything better to do, write my program for me!", kinds of threads always make me chuckle. What a better way to learn then do nothing and have someone else do all the...
Yes it is indeed MFC related, but I was trying to be vague to protect myself from the "THIS IS NOT A MFC FORUM" or "eww MFC" crowd, but I guess I might as well post my problem in more detail in hopes...
Don't know exactly which forum to post this in... anways below is my problem:
1) I have a project. (obviously)
2) In this project I have a "Resource.h" that has a series of #defines
3) I include...
Sweet! Did yah get it working?
----------------------------------
Yeah, if you have a situation where you feel like your function needs to call itself then you probably want a loop around...
Ha! Well played. :D
Functions are easy once you know how to use them, but don't you remember the n00blet days? For about a year I included #include <iostream> in my console projects just because my teacher told me to...
I think they got you in a pickle by telling you to use functions :eek:
You better hide or they might start badgering you again. :D
You have a bad case of what they call function recursion where...
ouchies you guys are rough... confusing the poor lad.
Whats up... am I mis-understanding something? Are you just trying to analyze the word and find the user specified letter and where it exists? Why not just go with a simple loop?
for(int i =...
Just a quick question regarding class hierarchy movement... I've googled and looked a tutorials, but just thought a human point-of-view would be more reliable as my exact answer I did not find.
...
"Better: make a struct/class that contains all the information you want to pass to the thread."
Yeah, but I was getting too lazy to keep making structs for passing in parameters to each thread I...
Just a curious question. Is it wise to try and pass objects on the heap around using an integer array by storing in each array item the address of the objects.
Something like the following...
I wish I had never read that :D.. but good stuff.
could you post some code Bubba?
I'm assuming your doing:
#include <vector>
int main()
{
template <typename T> friend ostream& operator<<(ostream& os, const AutoPtr<T>&obj);
?
The [] operator adds a blank entry to the map if it does not exist. If the find() function does not find the entry it simply points to the end of the map. (the map is not modified in any way)
...
yep nothing strange about that.
The const means you can't modify any of the classes member variables so modifying the parameter passed in isn't surprisingly. While:
void foo(const int x) constis...
for(i=0;1<3;i++)
is that a typo or do you really want 1<3 as the condition?
you using .NET or something? I never use .NET, but for c at the beginning of your code you could try adding
#define new new(__FILE__, __LINE__)
which should provide file and line information...
yah like i said I don't think he actually added the file to his project
1: Create a new Console project
2: Add a new blank .cpp to the project.
3: Goto File->New File->.cpp and copy his code...
what are you doing with them? Vectors = arrays so if you sort them those large objects will be shifted around in memory if I'm not mistaken while with a list, which is a series of node pointers when...
sure mate.. there is only 5 #'s in your array yet you are trying to access 6
your loops are looking for
a[0]
a[1]
a[2]
a[3]
a[4]
a[5] <--- doesn't exist
Could it be your file you are editing is not in your project? i.e. Right click your Project->Add Existing Item->(select your .cpp that you are showing us)
I could be way off, but just another...
Without looking too much could it be precision of your variables?
int mWeight;
int mScore;
it could be rounding your math off to ZERO ?
try switching them to double or
which can be done via
in_stream.open(file.c_str());