Search:

Type: Posts; User: thetinman

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    399

    STD and Performance

    When ever I use the STD namespace, my programs become dramatically slower. In other words, C++ things such as string, new, delete, and cout all cause code to run super slow. I get around this by...
  2. Any transpilers for alternative C/C++ syntax?

    What I mean is a language with equivalent functionality, but different syntax. Basically, something that transpiles into C/C++. Are there any that are ready for production code?

    I've been using...
  3. I had not thought of a good way to test that. It...

    I had not thought of a good way to test that. It looks like explicitly calling a constructor always instantiates an object, while inheriting a class does not.
  4. Does calling a constructor from a constructor create two objects?

    class Foo : public Bar {
    public:
    Foo();
    Foo(char b);
    private:
    char x;
    };


    Foo::Foo (char b) {
  5. As far as I know, I am using the proper calling...

    As far as I know, I am using the proper calling conventions for JNI and Python. Although, I would say that there is limited authoritative reference on Python (and I haven't read too much about JNI). ...
  6. Unpredictable results with shared library only

    When compiled as a stand-alone program, my code always behaves as I expect it to.

    However, I've also compiled my code as a shared library. For some reason, calling the library from both Java...
  7. Optimization implications for virtual machines

    I'm trying to optimize an algorithm for a virtual machine. Does the fact that it is a virtual machine mean that there are special limitations that I should be aware of? My understanding is that the...
  8. Replies
    1
    Views
    1,133

    create user define literal?

    In C++ there are a number of primitives that are not defined in terms of other types. By this I'm thinking

    int a = 1;
    char b = 'M';
    float c = 3.45f;
    short d = 0xC3A3;

    Is it possible to...
  9. Function and variable names visible in disassembler/debugger

    I've been examining some compiled code with OllyDbg. I've noticed that I can see the names of classes, functions, and variables. Is OllyDbg extrapolating this information from my source code? Or,...
  10. Including source file twice, but with include guard

    I have four source files. The main source file includes two other source files. The two other source files both include the fourth source file. In the fourth source file I have an include guard. ...
  11. I am using the string to hold a file image. I am...

    I am using the string to hold a file image. I am moving the image into the program after it has been compiled.
  12. Possible to create char string at compile time?

    I would like to have a program with a 5 mb string embedded in it kind of like this:


    const char *c;
    c = (const char*)"BEGIN_STRING_HERE, (5 MB of arbitrary values here)";

    Is it possible to...
  13. Replies
    1
    Views
    860

    How to embed a file in a C program

    I have a C program. Within it, I would like to embed either a file or a pre-assigned variable. I would prefer a method that is platform independent.

    I am using the data type "RSA" from...
  14. How many lines of code (to focus on) per programmer?

    By this I referring to large software projects. For example, Windows OS is probably 50+ million lines of code. Any programmer hired to help maintain such a system would have to specialize in a...
  15. Replies
    9
    Views
    2,007

    Potential employer gave me homework

    I had a job interview several days ago. They have now asked me program a small puzzle game.

    Although I anticipate that it will be less than 1,500 lines of code, it is still a substantial amount...
  16. Manipulating individual bits in a double precision number

    I'm trying to display double precision numbers in binary form so that I can manipulate them on the bit level. I'm pretty sure I've figured out how to display them in binary form, only I'm getting...
  17. Replies
    13
    Views
    8,386

    The code iterates in a tree like fashion. In the...

    The code iterates in a tree like fashion. In the extreme case, the tree would only be 40 levels deep, so the memory footprint is relatively small. Each node on the tree though, would have 40...
  18. Replies
    13
    Views
    8,386

    But using goto will make my recursive function...

    But using goto will make my recursive function work in a way that is more similar to an iterating function.

    I was thinking that each time the recursive function is called, copies of variable are...
  19. Replies
    13
    Views
    8,386

    Optimizing recursive function calls

    I have a function that does a huge number of iterations. I suspect that the function calls themselves are resulting in overhead. I tried passing by reference instead of by value, but this slowed...
  20. Replies
    3
    Views
    848

    I think I phrease that poorly. I'm trying to...

    I think I phrease that poorly. I'm trying to find the largest possible value of my_output_double that results in a value of guessed_number <= limit_number
  21. Replies
    3
    Views
    848

    Numerical Search with 1-Bit Precision

    I'm trying to do a numerical search and I want to find the number exactly. Here is some code to illustrate my question:



    long guessed_number, limit_number = 1000001;

    guessed_number =...
  22. That makes sense. It would explain why my...

    That makes sense. It would explain why my program hasn't crashed.
  23. I think I'm actually compiling this as C++. I'm...

    I think I'm actually compiling this as C++. I'm using mkoctfile to compile, and the file I'm using ends in .cc.

    When I tried to compile without the casting, I got some message about conversion...
  24. Safe to declare an array of structures that contain arrays?

    Is it safe to declare an array of structures, if the strucure itself contains dynamically allocated arrays? Below is some sample code.

    The program I'm working on seems to work, but I'm worried...
  25. Replies
    1
    Views
    898

    I had text parsing some luck using the Boost...

    I had text parsing some luck using the Boost library.
Results 1 to 25 of 205
Page 1 of 9 1 2 3 4