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 strongm 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. qkslvrwolf

    Strange scoping issues

    I'm having a weird scoping issue where I add a new instantiation of a class (edge) to a Vector (edges). However, no matter how many layers of newness I add to the edge that I add, it creates a pointer to the same object...so I get a Vector with a bunch of copies of the last object that I add...
  2. qkslvrwolf

    Random float generation

    Very much so. I feel foolish. Thank you very much. :)
  3. qkslvrwolf

    Random float generation

    Yes, but shouldn't the division take care of that? I mean, shouldn't I be able to reutnr things like 16855/155683 = some long float string? Those are both integers...
  4. qkslvrwolf

    Random float generation

    Hi, I'm trying to generate some random floats, preferablly with a fairly involved post decimal presence, if you take my meaning. Currently, I've tried this...#include <stdlib.h> #include <time.h> int main() { float check; int i; srand((unsigned )time( NULL )); for (i = 0; i < 20...
  5. qkslvrwolf

    diff usage

    Oh, yeah, I figured it out anyway, so its a moot point
  6. qkslvrwolf

    diff usage

    Umm...well.. 1) I've been using this forum 2) The guys here know unix 3) Didn't think that it was that big a deal
  7. qkslvrwolf

    diff usage

    yeah, so can someone give me a more down to earth explanation of diff? I'm trying to compare 2 files of aournd 5000+ lines lenght, which should (I hope) be similar if not identical. I do not understand diff, however, and man pages are...poorly written. Thanks!
  8. qkslvrwolf

    what is windows game programming?

    Given the direction microsoft is taking (not that I've ever liked microsoft, understand, but I was willing to put up with them.) that does seem something of a sin. The only problem being, no one has yet managed to build a decent game specifically for linux. If I could get Half-life DoD ported...
  9. qkslvrwolf

    compile error with strtof

    Some linux flaovr, I'm not entirely sure. Or it might be Unix. I'm SSH ing in to a server. I wasn't filled in on teh details.
  10. qkslvrwolf

    compile error with strtof

    Doing the cast from strtod to float worked, thanks alot everyone!
  11. qkslvrwolf

    compile error with strtof

    I tried man strtod, strtof, and niether worked. the only strto function I could get a man page for was strtol, which obviously returns long integers, so no help. I'll try using strtod and casting to float. (need an exact length). Thanks alot! I'd still like to know why it compiles for...
  12. qkslvrwolf

    compile error with strtof

    phoenix:~/sean % gcc -g functions.c /var/tmp/ccuTj3uV.o: In function `string2float': /home1/sabbott/sean/functions.c:104: undefined reference to `strtof' hmmm...any idea why my...
  13. qkslvrwolf

    compile error with strtof

    Just a note, I've corrected the function instantiation to &quot;float string2float(char * word)&quot; but this obviously hasn't helped with the compile error.
  14. qkslvrwolf

    Passing arrays to functions

    You can also use tolower(int c) to lower things. (Yes, I know this was a pointless post, but I've been asking so many question I felt like I needed to answer one, even if its one that didn't exist.)
  15. qkslvrwolf

    compile error with strtof

    For some reason, this #include <stdlib.h> int string2float(char *word) { float ret; ret = 0; ret = strtof(word, NULL); return ret; } gives me an &quot;unidentified reference to strtof&quot; at the line of ret = strtof(word, NULL); Which really confuses me, because elsewhere in this...
  16. qkslvrwolf

    how to convert float to binary

    Cool. Didn't know you could to ++i. Thanks! As to whether you explain the binary rep of floats, I'd sure appreciate it, but its your time. I'm already grateful for all the help you've given! sean
  17. qkslvrwolf

    how to convert float to binary

    Thank you both. The explanations were both wonderfully helpful, and it seems to work. Two questions though. First, when you do res[i++], does this increment i after it uses i as an index? I'm assuming thats the case, otherwise, you would have to have initialized i to -1. Second, when I run...
  18. qkslvrwolf

    how to convert float to binary

    Ok, this one is a little bit over my head...I've had it explained by my prof, but am still a little fuzzy. Can anyone give me an algorithm for this? Preferably with a non-code explanation?
  19. qkslvrwolf

    Int to binary converstin issues

    Thanks! HTats really pretty cool. I&quot;m (obviously, I think) new to C and still working out the way it handles pointers, arrays, (and therefore strings). Thanks again, I'll probably be able to use that later. sean
  20. qkslvrwolf

    A certain annoying warning that crops up seemingly at random

    Never mind...figured it out.

Part and Inventory Search

Back
Top