Search:

Type: Posts; User: Swoorup

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,308

    Writing portable code

    Hi,

    I would like to know portable way of setting up libraries and dependencies, and set up projects settings automatically. I am confused whether is CMake or Premake that I should learn.

    Could...
  2. Replies
    5
    Views
    728

    Thanks guys! How do I go on manipulating...

    Thanks guys!
    How do I go on manipulating individual condition though?
  3. Replies
    5
    Views
    728

    if statement confusion

    I have a condition and I would like to instead change the condition so that it would execute the previous statements after else statement.

    It seems hard to explain but I'll try my best to...
  4. Ok tell me where to begin with? Are you...

    Ok tell me where to begin with?
    Are you recommending to just keep practicing?
  5. I feel I didn't get an proper answer except...

    I feel I didn't get an proper answer except opinions. I guess I'd come back after 10,000 hours lol
  6. Is it necessary that in C++, every thing should...

    Is it necessary that in C++, every thing should be treated as objects? I feel like I am trying to pursue a flawless design that I can never achieve.

    Ok, since I am still stuck with it, can you...
  7. Obsessed about OOP design, can't get away until I do it!

    Recently I had just learnt C++. I come from a procedural oriented programming background. I do know the structure and methodologies of C++.

    The thing is that, whenever I'd try to make an program...
  8. Hmm, thank you Is the opmization of the compiler...

    Hmm, thank you
    Is the opmization of the compiler like this though? when x %= 256 then x &= 255 not x &= 256 :p

    I am learning about the lower-level details of C++ and finding out the relation...
  9. I see, thank you. Which one would be the most...

    I see, thank you.
    Which one would be the most effective for picking random though?
  10. So, you mean, they are the same if I change...

    So, you mean, they are the same
    if I change nRand %= 255 to
    nRand %= 256?
  11. Difference between mod and bitwise And operator

    Hi,
    Can someone give me the differences between & and % ?
    I have the following algorithm which limits a random variable to 255 only.

    int nRand = rand();
    nRand %= 255;

    Now , doesn't the last...
  12. Thread: Acute Angle

    by Swoorup
    Replies
    0
    Views
    1,078

    Acute Angle

    I am given a assembly code which minimizes an infinitely large radian acute angle. But I am confused with how the fpu works. I fairly know about the general registers and other generic opcodes.

    I...
  13. Replies
    9
    Views
    2,114

    thank you guys, I had been implementing the abs...

    thank you guys,
    I had been implementing the abs function as an inline function.

    template <typename T> inline const T abs(T const & x){
    return ( x<0 ) ? -x : x;
    }

    Thank you...
  14. Thread: Need guidance!

    by Swoorup
    Replies
    3
    Views
    4,138

    I have been working on a team project myself. Now...

    I have been working on a team project myself. Now others from the team would like to join to contribute it. But I am stuck with the traditional system of just copying files over the internet.
    ...
  15. Thread: Need guidance!

    by Swoorup
    Replies
    3
    Views
    4,138

    Need guidance!

    What is repositories? And How will I be able to license my codes?
    What is SVN, GIT?

    I am going to start a team project but I am clueless about those things. Can some one kindly give me guidance...
  16. Replies
    9
    Views
    2,114

    I am rewriting some functions of a game. The...

    I am rewriting some functions of a game. The thing is that there are now larger nodes to be searched than before. You can see that I have removed sqrt operations in the hopes of making this function...
  17. Replies
    9
    Views
    2,114

    Need optimization for faster performance

    Which one is faster for floating point operation?
    x = a / 2.0f;

    or

    x = a * 0.5f;

    I have seen some codes using the bottom one but that I believe adds to un-readability. Also even so, will...
  18. Sorry about the double post. The error was due...

    Sorry about the double post.
    The error was due to limited heap size when actually greater array was used!
  19. Nop, I haven't really used anywhere else other...

    Nop, I haven't really used anywhere else other than those two function.

    @Salem,
    the CPathInfoForObject just simply contains simple data like char, int, short,etc.
    (Next, replace some magic...
  20. The static variable is public, and is accessed...

    The static variable is public, and is accessed directly by other functions using CPathFind::g_pPedPathInfos. It seems that the delete operator is automatically invoked somewhere
  21. Yes, I am pretty sure, since there are large...

    Yes, I am pretty sure, since there are large number of dependencies of this specific class and its static variable. What could be the problem,?
  22. new and delete, pointer arrays not working with static variable

    I am using the following code.


    void CPathFind::AllocatePathFindInfoMem(void){
    if (g_pCarPathInfos){
    delete [] g_pCarPathInfos;
    g_pCarPathInfos = NULL;
    }
    if...
  23. Replies
    2
    Views
    1,390

    Thanks a lot Salem! Solved

    Thanks a lot Salem!
    Solved
  24. Replies
    2
    Views
    1,390

    Help printf desired number of characters

    I am trying to printing a short signed whose values range from -32k to 32k. And hence I am using 0x%04X to shorten the length to 4 bytes. But there are some short values equal to -1 or negative and...
  25. Replies
    8
    Views
    1,026

    Changes done! Never made much use of C++. So,...

    Changes done!

    Never made much use of C++. So, I tend to use C functions.

    When using new operator inside a function, would it be cleaned at the stack cleanup or do we have to use delete?
Results 1 to 25 of 83
Page 1 of 4 1 2 3 4