Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. netprik1

    Code with Templates not Linking

    Ah, yes, I see...that's what happened. I'm traditionally a Java developer, so I forget about things like that in C++. I ran the code in debug mode the second time. No problem now - the code's just as fast as it was before. Thanks for all the help!
  2. netprik1

    Code with Templates not Linking

    Alright, so the problem's solved. Apparently, the fact that all template declarations needed to be in the header file was the only problem. I didn't REBUILD the code, I only BUILT it, and that's why my changes had no effect at first. I rebuilt the code, and it worked. Now the other problem...
  3. netprik1

    Templates and Generics - Effects on Performance?

    Could anyone tell me how, if at all, templates and generics affect code speed. I know that it depends on the kind of code, but my main question is whether using templates instead of actually having an implementation for each type, slows down the code at all. Or is all the work done at compile...
  4. netprik1

    Code with Templates not Linking

    That doesn't fix anything though...I've even tried shoving all the code into a single file, but that still doesn't fix anything. It looks like it doesn't understand that this: allocate2DArray <unsigned char> (100, 100); is trying to access this: template <class T> GenericArray2DStruct<T>*...
  5. netprik1

    Code with Templates not Linking

    I'm having a problem getting templates to work in a program. I haven't used them for a while, so maybe I'm confused somehow as to how to use them correctly. I looked it up and it seems that I have the right syntax though. I do not get a compile error. I get a linker error. I'm using Deviant...
  6. netprik1

    Data Corrupted in File I/O operations

    It's fixed! Thanks a ton, you just made my day! I was going crazy about this yesterday...
  7. netprik1

    Data Corrupted in File I/O operations

    So here I am running regular C code that looks like this: (I am new to these forums and don't know how to do the code box, I'll try my best) <code> #include <stdio.h> #include <stdlib.h> #define xImageSize 435 #define yImageSize 383 typedef struct { unsigned char** data...

Part and Inventory Search

Back
Top