Thanks, I'll look into what you suggested a bit more. But as of now, I only acquire a lock once and do all the processing then. I intended to keep it like that, but this case is the only exception...
Type: Posts; User: rocketman03
Thanks, I'll look into what you suggested a bit more. But as of now, I only acquire a lock once and do all the processing then. I intended to keep it like that, but this case is the only exception...
Yes, that is correct. There are only two threads at the moment. The physics thread acquires a lock before it performs the simulation. The problem is that I don't want the user to acquire a lock or...
Hi,
I have an application which needs to access data from another thread but I'm not sure how to handle this. I am explaining this in terms of physics objects which my application has but there...
ah, I see. What do you recommend I use to learn assembly ? a high level assembler like MASM and then go to FASM after that, or straight to FASM ?
Thanks for the replies, I have a few questions, is NASM a raw assembler ? is it possible to write openGL or diectX apps using it ?
I looked into MASM and found constructs like IF ELSE FOR etc and...
I'm planning to learn assembly for an independent study class in my college. I have 2 years of c/c++ experience and feel I'm pretty good at it now. I have never written assembly but want to learn it...
I see. Thanks!
I was just reading the definition of assert in assert.h and basically it was this :
#define assert(_Expression) (void)( (!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),...
Ah, you are right about the u > 0 condition, that was a typo. Although even if I switch it to u > 0, the stream still fails. I had never used unget() in c++ before so I thought I would try it since...
Aah, Worked like a charm!
Thank you so much!
But If anyone knows, I would still like to know why my previous code failed ?
Anyone ?
Also, I added an assert after the for loop ->
assert(infile.good());
and it does fail after about 20 lines, I checked the file and it seems to be fine.
Hi,
I'm trying to create a 3d model loader, so one part requires me count the number of '/' in a line and store it. After that I need to go back to the start of the line so I can get the data.
...
Hi,
I am trying to write a program to generate permutations of an integer from 0 to a certain n(specified by the user).
So for example -
n = 1
1
Ahh, I found the bug.. I had another array on which Run was called which held only static cars. That is why it wasnt working properly.
For the copy constructor, My car class has pointers to other...
Hi,
I have an array of base class pointers which I initialize with derived class pointers. However when I call the Run() function, only the base class one gets called.
Heres my code -
void...
Yes, It worked! The problem was further on in the code.
Thanks everyone!
sorry, that was a typo.
CarHandler::CarHandler(Cars* car_array,int numCars)
{
this->car_array = car_array;
this->numCars = numCars;
}
I have cars in both places, but it doesnt...
HI,
I'm trying to create a dynamic array in one function and then passing it to another function. However I am not able to get it to work ? can someone please tell me how to do this properly ?
...
Hi,
I had this minor question -
What is the difference between using a , and ; to seperate expressions ?
for example-lets say i have a rectangle class and it has a constructor with 4...
Oh, well now I'm confused. What exactly is the point of ios_base::binary then ? I checked both my files and they are absolutely identical and have the same file size as well.
Also, I remember...
Oh sorry! I forgot to say, The program works fine except that the new file it creates is not in binary. It is same as the input file, however I want it to be non human readable.
Hi, Im trying to write a program to read in a textfile and convert it its binary represntation. I was under the impression that c++ does this automatically if you construct an ofstream using...
Hi,
I'm trying to use a global array declared in a .h file. The array is marked as static and defined in the .cpp file.
I have a macro which gets the size of the array and is defined as such
...
Could you name a few of these books? Not just the beginner ones but the ones which will be useful down the line or the ones you have found worth a read ?
aah..you were right, a few off by one errors. Heres the updated code, seems to be working now.
void RevWords(char** str)
{
char temp[255];
int i = 0,j = 0,index;
int len;...