Search:

Type: Posts; User: Roger

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,090

    Strings & strtok(...)

    Hi, I'm messing with strings today (mostly for learning purposes). I have a text file that I'm going to read from; each row has three numbers:
    1) year
    2) month (as an integer)
    3) numeric value...
  2. Replies
    1
    Views
    1,335

    Problem with sqrt and cast

    There is something I don't understand about casting. This works if I put a double in the place of (float)n.



    #include <math.h>
    ...
    int n = 10;
    ....
    printf("%f\n", sqrt((float)n));
  3. Replies
    7
    Views
    2,773

    Kenedy/Cyberfish, I think I am going to try...

    Kenedy/Cyberfish,
    I think I am going to try building a Linux server with an old computer over the break; I reformatted the drive recently with Umbuto. Regarding certificates, I was starting to get...
  4. Replies
    7
    Views
    2,773

    Industry experience. How?

    Hello, I'm looking for some advice on how to get established as a programmer, (I am particularly interested in developing interactive, database-driven web sites).

    I am a computer-science student...
  5. Replies
    3
    Views
    1,982

    Great! Thanks anon, that makes perfect sense too.

    Great! Thanks anon, that makes perfect sense too.
  6. Replies
    3
    Views
    1,982

    'Hello World' of Inheritance (need help)

    Hello,
    I need to understand the basic syntax of C++ and object oriented design including inheritance. So I'm trying to compile a sort of template to aid my understanding. This code has multiple...
  7. Replies
    6
    Views
    1,159

    Thank you Dae! Now, I have a follow up...

    Thank you Dae!

    Now, I have a follow up question if anyone can help...

    I would like to write a 'global function' that is *outside* of the class. This function should be able to work with two...
  8. Replies
    6
    Views
    1,159

    Newb requests help with basic syntax

    Hi all.

    This is my first attempt a OO in C++. I'm sure there are some obvious mistakes. I know there must be more than one way to do this, but I would like to follow a partial example I was...
  9. Replies
    4
    Views
    1,740

    Thank you very much for your help laserlight. :)

    Thank you very much for your help laserlight. :)
  10. Replies
    4
    Views
    1,740

    char name[50]; float amount; ... ...

    char name[50];
    float amount;
    ...

    sscanf(buffer, "%s $%f", name, amount);




    warning: format â%fâ expects type âfloat *â, but argument 4 has type âdoubleâ
  11. Replies
    4
    Views
    1,740

    String with two words: 1)String, 2) $double

    I have a string saved in memory with exactly one space in the middle and two substrings; the string is formatted like this:

    "Mike $120.00"

    The first word will be saved as a string, the second...
  12. Replies
    2
    Views
    3,094

    Hardware/software solution for online tutors

    I recently downloaded GoToMeeting . I am thinking of using it to help me learn computers faster. I recently went back to school and am frustrated with my own ability to learn at times.

    I don't...
  13. Replies
    3
    Views
    4,335

    MK27, It's required study for class. But so is...

    MK27, It's required study for class. But so is TCP, so a hello world example for tcp is good too. I'll look at Linux manual in the mean time.
  14. Replies
    3
    Views
    4,335

    sockets/udp: Hello world

    I'm trying to learn about udp and most of the examples I am looking at are a little complex. Can someone please show a link or paste some code for a 'hello world' sort of server-side-UDP script?
  15. Replies
    2
    Views
    4,953

    udp: sizeof() and recvfrom()

    I'm having problems with these two lines of code and incompatible types. The code worked, but compiles with this warning:
    "warning: pointer targets in passing argument 6 of ârecvfromâ differ in...
  16. Replies
    1
    Views
    1,176

    Real basic compile/run question

    I'm still new to C and am having trouble running a compiled program.

    In the past when I compile on Linux I never specified a name of the file, so I would run the program with this command line...
  17. Replies
    2
    Views
    3,649

    oh geeze, I was fopen ing with "r"! Thanks...

    oh geeze, I was fopen ing with "r"!
    Thanks zacks7
  18. Replies
    2
    Views
    3,649

    fread() & fwrite()

    This is my first attempt at using fread() and fwrite(). I am successfully reading one character at a time and trying to replace/write one character at a time to the same file. I can see by the printf...
  19. Replies
    10
    Views
    1,826

    Get an int from end of string?

    I have an char array (a string) that looks like this yadayada235

    I am looking for an easy way to get the int that is at the end of the string.



    char *s = "yadayada235";
    int n =...
  20. I appreciate your help, but it's not supposed to...

    I appreciate your help, but it's not supposed to be circular,,, the reason for the "tail" and "previous" is to run backwards through the list starting at the tail; i.e., the list can be printed...
  21. Quzah, I don't understand why this works (which...

    Quzah,
    I don't understand why this works (which I put in just for testing):

    printf("%d\n", strcmp(new->name, head->name));
    and this very next line prints a "sementation fault" error:

    if...
  22. ....edit

    ....edit
  23. nadroj, head is NOT null ("John" and "Paul" is...

    nadroj, head is NOT null ("John" and "Paul" is printed in my example), but I still get a segmentation fault on the next line.
  24. struct, string, strcmp(), and "segmentation fault"

    I'm getting a segmentation fault on the last line noted below. I'm comparing two strings.


    struct node {
    char name[25];
    char address[65];
    float amount;
    struct node * next;
    };...
  25. Replies
    1
    Views
    2,191

    Strings and structs

    I am getting this following error for the code at the bottom of this post:
    "error: incompatible types in assignment"

    The error is referring to these two lines of code:


    curr->product =...
Results 1 to 25 of 30
Page 1 of 2 1 2