thanks a lot for the explanation :)
Type: Posts; User: nik
thanks a lot for the explanation :)
Hello I have the following code:
ifstream file("file.data");
int number = 0;
file.read((char *)&number, sizeof(int));
I would like to understand what the third line does.
thanks a lot :)
Hi I have a class where I define a
vector<char *> myVector to be a private variable.
This variable will store permutations of a string
For example, if the string is "123" it will store...
You are correct sorry. It prints garbage. I still kind of don't understand how mem copy works on int and chars. I understand why it works in chars, but since we copy bytes why doesn't it work with...
Thanks for your answers
In the first example doesn't it have 4 bytes allocated? I mean for a string we have 3 characters, and also the null pointer at the end
so I have 4 bytes
for the...
Hi I would like to understand how memcpy works when dealing with a sequence of characters and integers
the definition of memcpy is the following:
void * memcpy ( void * destination, const...
the site doesnt let me post my question although I use code tags
please read here
hi guys i have this exercise and I m not sure if I'm correct
for (i=0 - Pastebin.com
thanks
hi guys
Hello guys, I'm planning to create a simple tic tac toe game, user vs computer and I want to make the computer to never lose
I'm planning to create this in Java, but since java and C++ are quite...
hi i asked few days back if it was possible to count the execution time using clock, well i got replies telling that its not possible
my code runs on linux, are there any specific functions that...
oh now I see, you're right...
thanks for helping me out :)
hi whiteflags thanks for your answer
"One thing that you are wrong about though is that you can also stop the loop if this part is false:
while(i!=(right + 1) && A[i]<=pivot) i++;
"
when you...
hi can you please tell me if this is correct?
void quickSort(int A[], int left, int right){
int i = left, j = right, pivot = A[left];
while(i<=j){
the problem is that i dont know the time in seconds, it always returns 0
i have implemented an algorithm and the execution time is really small and when I use clock() I get a 0 as a result
is it possible to make clock() display results in milliseconds or even smaller...
thanks for your answer kmdv
one last question, if there are similar variables in both programs, is it better to put them out of the if statement or it really doesn't matter?
hello friends,
is it a good or a bad technique to create variables inside an if statement?
for example
i have
thank you very much!!! You helped me a lot, i ll contact my teacher to ask for one if i dont find anything online :)
it throws me a message telling
"Unsupported 16-bit Application"
The program or feature ...... cannot start or run due to incompatibility with 64-bit Windows versions of Windows. Please contact...
it says
"flex nameoffile"
where name of file is the name of the .FILE file that has the C code for flex, its weird because today in the morning our professor showed us the same thing and there...
Yes, i could find nothing.. i tried this You receive a "NMAKE : fatal error U1045: spawn failed : Invalid argument" error message when you compile a makefile by using the Microsoft Program...
hi guys, sorry for posting it here, i think its the wrong category but i dont know where else to ask, i searched online for this error and found nothing
im taking a course on compiler design and...
i tried the gettickcount but for some reason it didnt return anything except 0
as for QueryPerformanceCounter
i tried your code, but it didnt work i put for before, after and frequency a...
hi, how can i do this?
i tried using gettickcount of windows.h and also the clock function in time.h but none worked, it gave 0 as a result
thanks in advance
thanks kmdv