Search:

Type: Posts; User: dharh

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    14
    Views
    3,360

    There seems to be a couple problems. Specificaly...

    There seems to be a couple problems. Specificaly with lines


    all: calc

    calc: Stack.o calc.o
    g++ stack.o calc.o

    which have tabs in the dependency headers. Also the label 'calc' doesnt...
  2. Thread: beginner ?

    by dharh
    Replies
    2
    Views
    1,913

    scanf doesn't catch the carriage return very...

    scanf doesn't catch the carriage return very well, so in your loop when it comes back around their is a carriage return in the buffer. This carriage return seem to remain in there and thus causes...
  3. Replies
    3
    Views
    1,551

    Borland 5.5 free command line compiler. I don't...

    Borland 5.5 free command line compiler. I don't get errors on compile, I get run time error, the in program code error "stack underflow".
  4. Replies
    7
    Views
    1,311

    Just as you declared the FILE *fp; in main you...

    Just as you declared the FILE *fp; in main you can also declare variables in functions. Like:



    someFunction( ) {
    char myChar;
    int myInt;
    /* doing other function stuff */
    }
  5. Replies
    7
    Views
    1,311

    Since the type FILE is defined in c lib: ...

    Since the type FILE is defined in c lib:



    struct temp {
    char strg1[ N ],strg2[ N ];
    int test[ N ];
    float fraction;
    };
  6. Replies
    7
    Views
    1,311

    You put the structure definition outside the main...

    You put the structure definition outside the main so that other functions can define a structure ( like defining a char or int ). The file pointer is just fine inside main.
  7. Replies
    7
    Views
    1,311

    Heres how I do it. struct temp { char...

    Heres how I do it.



    struct temp {
    char strg1[ N ],strg2[ N ];
    int test[ N ];
    float fraction;
    };
  8. Replies
    3
    Views
    1,551

    more pointer problems

    For some reason the change in pointer location made from a function does not carry back. When I run this and input something like 1 + 2, I get stack underflow.



    #include <stdio.h> /*...
  9. Replies
    3
    Views
    1,176

    Candidate release is a build which is being...

    Candidate release is a build which is being tested for bugs. Sometimes they actually release this to the general public, but not the official release. They start doing this when enough features are...
  10. Replies
    9
    Views
    2,328

    No way inside the function?

    No way inside the function?
  11. Replies
    9
    Views
    2,328

    That explains some of the problems ive had in the...

    That explains some of the problems ive had in the past.

    I guess the final question I have is:



    struct ipList **getList( void ) {
    static struct ipList *list[ MAXLIST ];
    int i;
  12. Replies
    9
    Views
    2,328

    Though im still not sure how: malloc( MAXLIST *...

    Though im still not sure how:
    malloc( MAXLIST * sizeof( struct ipList * ) );
    differs from:
    malloc( MAXLIST * sizeof( struct ipList ) );
    exactly. I do understand what I was doing wrong with the...
  13. Replies
    9
    Views
    2,328

    #include #include #include...

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    #define MAXLIST 10

    struct ipList {
    int id;
    char *name;
    char *ip;
  14. Replies
    9
    Views
    2,328

    returning an array of pointers to structures

    This is mostely a problem ive made for myself. I have:


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    #define MAXLIST 10

    struct ipList {
  15. Replies
    10
    Views
    1,556

    Every now and then I throw code around, sorry if...

    Every now and then I throw code around, sorry if a decapitate a head or two.
  16. Replies
    10
    Views
    1,556

    void swap( int &x, int &y ) { int temp; ...

    void swap( int &x, int &y ) {
    int temp;
    temp = x;
    x = y;
    y = temp;
    }

    or

    void swap(int *x, int *y) {
  17. Replies
    10
    Views
    10,508

    Here is an example of what I use to read stuff...

    Here is an example of what I use to read stuff from stdin.



    /* fgets _stdin function, gets like fgets using _stdin
    */
    int gets_s(char *str, int size) {
    /* variable to say if there has...
  18. Replies
    10
    Views
    10,508

    I think he might want to something where, if the...

    I think he might want to something where, if the buffer is empty do nothing. If the buffer has something in it, read it.
  19. Thread: reading file

    by dharh
    Replies
    2
    Views
    1,473

    thanks, that worked

    thanks, that worked
  20. Thread: reading file

    by dharh
    Replies
    2
    Views
    1,473

    reading file

    ok, im having a problem where im trying to read data in from a file and im getting extra data I don't want. Can't quite even figure out where this data is from sometimes.

    example of file:

    ...
  21. prototype/function would look something like...

    prototype/function would look something like this:

    void function(int array2[], int size);

    the call would look something like this:

    #define ROWS 50

    int array[ROWS];
  22. Thread: My plan

    by dharh
    Replies
    12
    Views
    2,697

    The best way I think to go about projects like...

    The best way I think to go about projects like that are ultimately to build programs of your own design around the things your learning. I learn much better and faster when I have to apply concepts...
  23. Replies
    4
    Views
    2,288

    What error does the linker give? strlen works...

    What error does the linker give? strlen works perfectly fine for me? Might have something to do with how you did your #includes before.

    As for the pause thing, I use batch files to compile and...
  24. Replies
    4
    Views
    2,288

    #include "..\ownh.h" #include "..\stdio.h" ...

    #include "..\ownh.h"
    #include "..\stdio.h"


    int main (void)
    {
    /* Input of String-array *
    char mystring [21] ;
    printf ("fill in a string: ");
    scanf ("%s",mystring);
  25. Replies
    36
    Views
    5,317

    What exactly did you do?

    What exactly did you do?
Results 1 to 25 of 51
Page 1 of 3 1 2 3