Search:

Type: Posts; User: Terrorist

Search: Search took 0.01 seconds.

  1. Thread: fread/fwrite

    by Terrorist
    Replies
    6
    Views
    3,385

    Is that a C or C++ code, I have tried to run it...

    Is that a C or C++ code, I have tried to run it and when I saw the libraries and the cin's I thought there is something wrong in posting this code.
  2. Replies
    5
    Views
    2,008

    1-even and odd are uninitialized junk integers...

    1-even and odd are uninitialized junk integers when the function is called.
    2- why are you using '==' here ?
  3. Replies
    3
    Views
    2,724

    What's the difference if I may ask ?

    What's the difference if I may ask ?
  4. Replies
    24
    Views
    8,641

    Thanks root4, that's pretty neat, at least as...

    Thanks root4, that's pretty neat, at least as optimized as possible.
  5. Replies
    24
    Views
    8,641

    P.S. The lines with bold and red fonts are the...

    P.S. The lines with bold and red fonts are the new additions:

    Function "compare" declaration,
    Function call.
    and function definition.
  6. Replies
    24
    Views
    8,641

    With these warnings in compilation: 68...

    With these warnings in compilation:
    68 C:\Dev-Cpp\Projects\bracket_final_testing_with_comp.c [Warning] passing arg 1 of `compare' from incompatible pointer type
    68...
  7. Replies
    24
    Views
    8,641

    Here it is: #include #define...

    Here it is:


    #include <stdio.h>
    #define B_OPEN '<'
    #define B_CLOSE '>'
    #define BRACKET_MAX 10
    #define B_CHAR_MAX 7

    char bracket[B_CHAR_MAX]={0}; //THE OPENING BRACKETS ARRAY
  8. Replies
    24
    Views
    8,641

    Yes I did. I am trying to implement that code...

    Yes I did. I am trying to implement that code you gave me to adapt in here, but it doesn't seem to work. I have defined the function compare using the code you posted, called that function after...
  9. Replies
    24
    Views
    8,641

    That's the problem matsp, knowing the end of the...

    That's the problem matsp, knowing the end of the tag. Since I am using the '>' as a marker of ending the tag in the push function AND it indicates if there are errors such as: infiniate tags, large...
  10. Replies
    24
    Views
    8,641

    So in other words, each row of those 2-D arrays...

    So in other words, each row of those 2-D arrays should end with null char ? which is not possible, is it ?
  11. Replies
    24
    Views
    8,641

    Actually it's my friends' assignment, but since...

    Actually it's my friends' assignment, but since long time no C for me, I wanted to do it myself, I have done most of the work here, but still the comparison part should be done.

    How does the...
  12. Replies
    24
    Views
    8,641

    Hi, What if it's not allowed to use string.h ?...

    Hi,

    What if it's not allowed to use string.h ? for the strcmp part ? is there any other way to do it ?
  13. Replies
    24
    Views
    8,641

    So what do you think I need to do in here ? I am...

    So what do you think I need to do in here ? I am working on two different codes at the same time, almost lost in this one.
  14. Replies
    24
    Views
    8,641

    Hi, here is the final code, but the 'compare'...

    Hi,

    here is the final code, but the 'compare' function doesn't seem to work. Can someone please help me in this.


    #include <stdio.h>
    #define B_OPEN '<'
    #define B_CLOSE '>'
    #define...
  15. Replies
    24
    Views
    8,641

    Hi, I have solved the problem of separating...

    Hi,

    I have solved the problem of separating the closing tags from the openeing tags and now I have got something like this:


    <html><body>This is HTML</body></html>
    You have written 4...
  16. Replies
    24
    Views
    8,641

    Thank You Very much, actually that was GREAT hint...

    Thank You Very much, actually that was GREAT hint from you, I have solved the problem....Finally, Just added increment to the char C (c=getchar();) before those nested IF's and now it works :D:D
  17. Replies
    24
    Views
    8,641

    Hi, Attached the C file, and for where is the...

    Hi,

    Attached the C file, and for where is the problem's cause, I am not really sure, but maybe:

    this bit:

    while((c=getchar())!=EOF && c!='\n'){
    if(c==B_OPEN){
    if...
  18. Replies
    24
    Views
    8,641

    HTML tags validator

    Hello folks,

    I have started to write this simple program that reads from keyboard, stores the on tags (aka <html>) into a 2-D array, and stores the off-tags (aka. </html>) into another. then print...
Results 1 to 18 of 18