Search:

Type: Posts; User: nik

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. thanks a lot for the explanation :)

    thanks a lot for the explanation :)
  2. Question about the function "read" of the ifstream class

    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.
  3. thanks a lot :)

    thanks a lot :)
  4. I can't understand the behavior of my vector in this recursion function

    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...
  5. Replies
    7
    Views
    5,219

    You are correct sorry. It prints garbage. I still...

    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...
  6. Replies
    7
    Views
    5,219

    Thanks for your answers In the first...

    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...
  7. Replies
    7
    Views
    5,219

    Question about memcpy

    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...
  8. Replies
    0
    Views
    1,621

    algorithm analysis help

    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
  9. Replies
    1
    Views
    1,047

    Questions about tic tac toe

    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...
  10. Replies
    3
    Views
    4,855

    count execution time in ubuntu(nanoseconds)

    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...
  11. Replies
    4
    Views
    1,919

    oh now I see, you're right... thanks for...

    oh now I see, you're right...

    thanks for helping me out :)
  12. Replies
    4
    Views
    1,919

    hi whiteflags thanks for your answer "One...

    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...
  13. Replies
    4
    Views
    1,919

    is my C++ quicksort implementation correct?

    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){
  14. the problem is that i dont know the time in...

    the problem is that i dont know the time in seconds, it always returns 0
  15. count execution time using clock() in milliseconds

    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...
  16. Replies
    3
    Views
    2,218

    thanks for your answer kmdv one last question,...

    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?
  17. Replies
    3
    Views
    2,218

    creating variables inside an if statement

    hello friends,

    is it a good or a bad technique to create variables inside an if statement?

    for example

    i have
  18. Thread: nmake U1045 error

    by nik
    Replies
    8
    Views
    7,369

    thank you very much!!! You helped me a lot, i ll...

    thank you very much!!! You helped me a lot, i ll contact my teacher to ask for one if i dont find anything online :)
  19. Thread: nmake U1045 error

    by nik
    Replies
    8
    Views
    7,369

    it throws me a message telling "Unsupported...

    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...
  20. Thread: nmake U1045 error

    by nik
    Replies
    8
    Views
    7,369

    it says "flex nameoffile" where name of...

    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...
  21. Thread: nmake U1045 error

    by nik
    Replies
    8
    Views
    7,369

    Yes, i could find nothing.. i tried this You...

    Yes, i could find nothing.. i tried this You receive a &#34;NMAKE &#58; fatal error U1045&#58; spawn failed &#58; Invalid argument&#34; error message when you compile a makefile by using the Microsoft Program...
  22. Thread: nmake U1045 error

    by nik
    Replies
    8
    Views
    7,369

    nmake U1045 error

    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...
  23. Replies
    5
    Views
    2,657

    i tried the gettickcount but for some reason it...

    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...
  24. Replies
    5
    Views
    2,657

    measuring function execution time

    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
  25. Replies
    2
    Views
    1,460

    thanks kmdv

    thanks kmdv
Results 1 to 25 of 45
Page 1 of 2 1 2