Search:

Type: Posts; User: yuzhangoscar

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    3,125

    How to write a makefile

    Hi all:

    Can anyone please give me a hand on how to write my own makefile?

    I have programming under Windows, do not know much about programming under Linux.

    Thank you
  2. Command in line argument and Visual Studio

    Hi all:

    How do I add command in line arguments to a project built in Visual Studio?

    Cheers
  3. Replies
    2
    Views
    965

    The outcome I want: long custid - 2 - 12 "No...

    The outcome I want:

    long custid - 2 - 12 "No bugs"

    After I read from the file:

    long
    custid
    -
    2
  4. Replies
    2
    Views
    965

    Help is needed, reading a string

    Hi all:

    I need to read a string from a file as following:

    long custid - 2 - 12 "No bugs"



    I am thinking of using fscanf(), but the...
  5. Replies
    3
    Views
    3,916

    Do not worry about it. Solved. What happened:...

    Do not worry about it. Solved.

    What happened:

    A bad pointer is a pointer that points to nowhere.
    I made a stupid mistake somewhere else.

    Cheers
  6. Replies
    3
    Views
    3,916

    The cause of a bad pointer

    Hi all:

    In my code, I declared a structure:



    typedef struct VIEW_MEMBER_TAG
    {
    char *VIEW_NAME; //Has to be less than 16 chars.
    char *type_ptr; //The type of a member.
  7. Replies
    3
    Views
    1,000

    void push(char* string) { size_t N = 0;...

    void push(char* string)
    {
    size_t N = 0;
    VIEW_MEMBER* newmem = NULL;

    newmem = (VIEW_MEMBER*)malloc(sizeof(VIEW_MEMBER)); //Need to check for error here.

    InitializeStack(newmem);

    N...
  8. Replies
    3
    Views
    1,000

    free() question

    Hi all:

    I declared a structure in the .h file to implement a stack:

    typedef struct VIEW_MEMBER_TAG
    {
    char *ptrString;
    struct VIEW_MEMBER_TAG *ptrNextViewMember;
    }VIEW_MEMBER;
  9. How to properly free a pointer and its allocated memory

    Hi all:

    I have declared a pointer as following:

    char *stringPtr = NULL;
    stringPtr = malloc(10);

    After I finish with it,

    free(stringPtr);
  10. Cheers. Thank you for your help

    Cheers.
    Thank you for your help
  11. A pointer that can be used to point anything

    Hi all:

    Can I declare a pointer as:

    void *ptr = NULL;

    and later use it to point at any type of data?

    Cheers
  12. Help is needed on creating a pointer stack

    Hi all:

    I need to create a stack that stores string pointers. But I do not really know how exactly I am going to start, can any one give me a hint?

    Thank you
  13. How to declare a pointer that points to another pointer?

    Hi all:

    It is easy to declare a pointer that points to a integer:
    int *ptr = NULL;

    My question is how to declare a pointer that points to another pointer, basically a pointer that...
  14. Replies
    11
    Views
    2,028

    You got it exactly right. I was so confused. ...

    You got it exactly right.
    I was so confused.
    I am very glad to have helpful people like you around.

    Cheers
  15. Replies
    11
    Views
    2,028

    A question about sizeof()

    Hi all:

    I need to measure the size of an alphanumeric string. But I found out when I used sizeof() on the following strings:

    1: VIEW1
    2: VIEW10

    The result I got was 4 for...
  16. Ennnnnnn..... That is right. I did not...

    Ennnnnnn.....



    That is right. I did not think that far. Thank you for your reply.

    Thank you
  17. ? Not so sure about it. Because when we...

    ? Not so sure about it.

    Because when we include header files, it is simply a copy and paste action.
    So my guess is that it does not really matter but I heard a few times that header file should...
  18. Should I put a structure delcaration in a header file?

    Hi all:

    As a general rule for good programming practice,
    Should I put the following structure declaration in a header file or in a .c file?


    typedef struct VIEW_TAG
    {
    char...
  19. Replies
    2
    Views
    987

    Thank you laserlight.

    Thank you laserlight.
  20. Replies
    2
    Views
    987

    ADT delcaration question

    Hi all:

    I have written the following block of code:


    typedef struct VIEW_TAG
    {
    char name[16];
    VIEW_MEMBER *ptrViewMembers;
    VIEW_MEMBER *ptrLastAddedMember;
  21. Replies
    2
    Views
    2,343

    How to read a word between two spaces?

    Hi all:

    I have assigned a task to basically process a text file. One typical line of text in the file is shown below:

    long custid - 4 - 12 "no bugs"

    There...
  22. Replies
    12
    Views
    2,591

    Thank you all. I have solved my problem, cheers...

    Thank you all. I have solved my problem, cheers everyone.
  23. Replies
    12
    Views
    2,591

    Help is needed to read text from a file

    Hi all:

    I have been given a text file full of text pattern as shown below:


    # VIEW OBJFILE = iiomsview16.V

    VIEW II_STD_HEADER_T

    # TYPE CNAME FBNAME COUNT FLAG ...
  24. Replies
    5
    Views
    2,356

    Cheers, will try it out.

    Cheers, will try it out.
  25. Replies
    5
    Views
    2,356

    Hi guys: Thank you for your reply, but I...

    Hi guys:

    Thank you for your reply, but I think because I put my question the wrong way, it somewhat misled you.

    Here it goes again:


    In this assignment, I was asked to read...
Results 1 to 25 of 26
Page 1 of 2 1 2