Search:

Type: Posts; User: Ktulu

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    891

    Maybe this Windows command line equivalent could...

    Maybe this Windows command line equivalent could help you in the right direction.


    cmd /v:on/kset/p"l=limit: "&for /l %n in (!l!,-2,0)do @echo %n
  2. Replies
    2
    Views
    4,787

    With MVC++ I have to declare as such: static...

    With MVC++ I have to declare as such: static __inline ...

    "Microsoft Visual C++ and few other compilers support non-standard constructs for defining inline functions, such as __inline and...
  3. You do not seem to take into account what...

    You do not seem to take into account what compilers can do nowadays, especially when you use optimization settings. Same idea applies to using strlen to get length of a literal string. You might...
  4. I found this...

    I found this on stackoverflow, maybe you could use it.
  5. Replies
    7
    Views
    732

    You have to decide if you want to process decimal...

    You have to decide if you want to process decimal numbers. Both source and destination have to match type.

    A hint would be: If you can calculate F when C is given, as shown in your equation, it's...
  6. As laserlight stated, sizeof does not evaluate...

    As laserlight stated, sizeof does not evaluate its operand in this case. Meaning sizeof(x+y) will give the same result as sizeof(x*y*x*y*x*y) and sizeof(x).
  7. Replies
    46
    Views
    2,713

    The code below will have the same result. Notice...

    The code below will have the same result. Notice the first line of code '*p = 0'? Even though it looks like we're setting the value at whatever p points at to 0, we're actually setting the value of p...
  8. Replies
    5
    Views
    571

    You're trying to set the value at whatever...

    You're trying to set the value at whatever storage location pointer *p points at to the storage location (address) of integer a. Because pointer *p has not been initialized it could contain a garbage...
  9. In case you're not going to read the link...

    In case you're not going to read the link regarding int main/void main that Salem suggested, then at least take a look at his avatar.
  10. Every day in a year (365) has an unique date, the...

    Every day in a year (365) has an unique date, the idea is to connect a day index to an unique date (mm-dd-yyyy) and display the result.

    You need to create a function that receives a day number...
  11. Thread: Floor and ceil

    by Ktulu
    Replies
    3
    Views
    1,161

    The functions floor and ceil work with doubles...

    The functions floor and ceil work with doubles not floats. Also num1[0] and num2[3] don't exist because they are not arrays.
  12. Thread: getline function

    by Ktulu
    Replies
    2
    Views
    649

    The getline function assumes that the storage...

    The getline function assumes that the storage location it receives from the char s[] parameter has enough space to store all the given input.
  13. Replies
    2
    Views
    2,097

    Members name and lastn of test_struct can only...

    Members name and lastn of test_struct can only contain a single character. You probably want to make them a little bigger.
  14. Replies
    18
    Views
    1,873

    I should have been more specific when I referred...

    I should have been more specific when I referred to "an uninitialized output argument".



    That depends a lot on the situation how CreateProcess is being used. When CreateProcess fails it might...
  15. Thread: Function

    by Ktulu
    Replies
    3
    Views
    509

    No it's not. Just because the demo function...

    No it's not. Just because the demo function provides some form of feedback does not mean it returns a value, at least in programming terms.

    When a functions returns a value it should really return...
  16. Replies
    18
    Views
    1,873

    Where does the documentation say that it reads...

    Where does the documentation say that it reads the ProcessInformation struct? The documentation says:



    This gives me the impression that there will only be information written to the...
  17. Replies
    3
    Views
    1,274

    You can compare to see if they point at the same...

    You can compare to see if they point at the same location.



    int* p1, p2;

    if ( p1 == p2 )


    Or you could compare to see if the value at whatever location they point at, equals.
  18. Thread: Const char

    by Ktulu
    Replies
    1
    Views
    442

    const is short for constant. When you declare a...

    const is short for constant. When you declare a variable with the const keyword you're basically telling your compiler that the initial value of this variable shouldn't change.
  19. Replies
    8
    Views
    1,268

    You're setting the values of tru1/2/3 to zero...

    You're setting the values of tru1/2/3 to zero each time the loop cycles so your good boy message will never be shown. Also, entering a passwords which exceeds 20 characters can lead to really bad...
  20. Thread: Macros...

    by Ktulu
    Replies
    1
    Views
    830

    Returning something from a function doesn't...

    Returning something from a function doesn't affect a function being inline or not. You shouldn't worry too much about that unless very specific situations arise. Modern day compilers will decide how...
  21. Thread: Square appearing

    by Ktulu
    Replies
    5
    Views
    898

    Because you have MAXLINE defined as 4.

    Because you have MAXLINE defined as 4.
  22. Replies
    18
    Views
    1,873

    Because to me setting the ProcesInformation...

    Because to me setting the ProcesInformation structure to zero before passing to CreateProcess feels like:



    char buff[buffsize];

    ZeroMemory( buff, sizeof(buff) );

    strcpy( buff, something );
  23. Replies
    18
    Views
    1,873

    So passing an uninitialized output argument could...

    So passing an uninitialized output argument could cause undefined behaviour?
  24. You should see struct name *ptr as a variable...

    You should see struct name *ptr as a variable that holds the address of another name struct. *ptr holds no actual data about the contains of a name struct itself only the location where the data...
  25. Replies
    18
    Views
    1,873

    I guess it's not specified if CreateProcess will...

    I guess it's not specified if CreateProcess will do anything with the StartupInfo parameter before this data will become available to the newly created process. So passing the StartupInfo struct...
Results 1 to 25 of 115
Page 1 of 5 1 2 3 4