Search:

Type: Posts; User: mugiwara528

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    24
    Views
    3,814

    Sir, can you explain why we should/ should not...

    Sir, can you explain why we should/ should not use all those? I'm curious on why I should never use void main and gets?
  2. Replies
    1
    Views
    950

    Need help with my RPN program..

    So this is basically my whole program, without the main..
    Its an infix to postfix converter and evaluator..

    The first time i did this was successful, but it only accepted 1 digit..for example 2*2...
  3. Replies
    1
    Views
    768

    char to char*?

    Hello, sorry if I'm asking a lot of questions, but is there any way to convert a char to char*?

    I'm reading a string one by one, and if i find a certain character i want to push it to a stack,...
  4. Replies
    8
    Views
    1,981

    Thank you, i think i get it now. I'll try to see...

    Thank you, i think i get it now. I'll try to see if this goes well with my whole program.
  5. Replies
    8
    Views
    1,981

    struct node //STACK { char *x; struct...

    struct node //STACK
    {
    char *x;
    struct node* next;
    };

    struct nd //QUEUE
    {
    char *x;
    struct nd* next;
  6. Replies
    8
    Views
    1,981

    I'll be using this for small numbers, so i guess...

    I'll be using this for small numbers, so i guess temp[5] will be large enough. Can you explain what happens in your code?
  7. Replies
    8
    Views
    1,981

    Appending a char to a char*?

    Hello, i really need help. I want to append a single char into a char* that i have..how do i do that? Is it even possible?



    char temp[5] ="";

    while(isalnum(*x))
    {
    strcat(temp,*x);
    x++;
  8. Replies
    7
    Views
    1,659

    10947 10946 10948 10949 This is my whole...

    10947
    10946
    10948
    10949

    This is my whole program so far..i undid the changes i made..so its functioning again now but only reads single characters..
  9. Replies
    7
    Views
    1,659

    If i had char a[6] = {...

    If i had
    char a[6] = { '1','2','+','3','+','4'};, how do i turn '1' and '2' into just "12" then push it to the stack? I tried using strcat() and made changes to my code, it didnt have any errors at...
  10. Replies
    7
    Views
    1,659

    Sir, can i ask how to use strtof and how to apply...

    Sir, can i ask how to use strtof and how to apply it in my code?
  11. Replies
    7
    Views
    1,659

    Infix to Postfix Help?

    Hey guys, i have a project to convert an Infix Expression to Postfix Expression or the Reverse Polish Notation.

    I'm almost done but my code only reads single digits..

    For example, if i input...
  12. Replies
    14
    Views
    2,086

    Oh! I just realized that now. So i have make my...

    Oh! I just realized that now. So i have make my char x; to char x[5]; ?? Man i hope this doesnt mess up my program -_-
  13. Replies
    14
    Views
    2,086

    Forgive me but I cant quite understand the...

    Forgive me but I cant quite understand the function you gave me XD What does static mean? What does the * before the function name mean too?
  14. Replies
    14
    Views
    2,086

    Oh really? Thanks, i'll try that.

    Oh really? Thanks, i'll try that.
  15. Replies
    14
    Views
    2,086

    It's like this struct node { char x; ...

    It's like this


    struct node
    {
    char x;
    struct node* next;
    };

    What i did was convert char to int using atoi, which was successful.
  16. Replies
    14
    Views
    2,086

    Actually i need to push the converted value to a...

    Actually i need to push the converted value to a stack i created, so is it possible to do that using sprintf? I dont want it to print anything
  17. Replies
    14
    Views
    2,086

    Converting an int to char?

    Hey guys, I need help converting an int to char??

    I have tried using


    char dig = (char)(((int)'0')+result);

    which works well, however, it can only convert values from 0-9 if i'm correct.
    ...
  18. Damn, so that's what's making it wrong. I changed...

    Damn, so that's what's making it wrong. I changed it to
    temp=(link1*)malloc(sizeof(*temp));

    since my compiler needs an explicit cast...Is that right? It works now...

    Thank yoooouuu :D
  19. Here is my function for building the list... ...

    Here is my function for building the list...



    void insert(link *head, int input)
    {
    link temp;
    link curr;
    link p;
  20. Still getting an error in deleting a node

    Hi, its me again. I revised my code and tried to follow what you guys said already, but I'm still getting the stupid window popping out when I try to delete a node from a linked list. (i attached a...
  21. Replies
    14
    Views
    3,404

    This function is to remove a node from the list...

    This function is to remove a node from the list and free the memory allocated to that certain node, so i guess i need to use free(), am i right? What do I do?? Do i pass call malloc in my main and...
  22. Replies
    14
    Views
    3,404

    It worked! I'm not sure though if what I did was...

    It worked! I'm not sure though if what I did was right...is it???




    link1 *dealloc;

    dealloc=(link1 *)malloc(sizeof(link1));
  23. Replies
    14
    Views
    3,404

    Actually there is, when I try to delete a window...

    Actually there is, when I try to delete a window pops up and says something like
    " Debug Error!

    Program: blablabla

    DAMAGE: after Normal block (#63) at 0x00431D20
    "
    Then i have to choose...
  24. Replies
    14
    Views
    3,404

    Actually i used typedef struct node...

    Actually i used



    typedef struct node link1;
    typedef link1 *link;
  25. Replies
    14
    Views
    3,404

    So I need to put something like dealloc = (link)...

    So I need to put something like dealloc = (link) malloc(sizeof(link)); in my function?
Results 1 to 25 of 32
Page 1 of 2 1 2