Search:

Type: Posts; User: Annihilate

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,839

    What compiler are you using there may be an...

    What compiler are you using there may be an easier solution.
  2. Replies
    9
    Views
    6,966

    Try changing to...

    Try changing to memmove(&alfa.sir[strlen(alfa.sir)],&alfa.sir[j],1);
  3. Replies
    4
    Views
    1,704

    Hmm i never really thought about the whole...

    Hmm i never really thought about the whole duplicate substrings until after i wrote that functions. I added in the 2D array after. I just can't see where my function is going wrong in terms of...
  4. Replies
    4
    Views
    1,704

    I am not sure what you mean by that question.

    I am not sure what you mean by that question.
  5. Replies
    4
    Views
    1,704

    2D Array problems

    Hi there i am trying to complete a string handling program. That searches a string and finds each 3 character sequences in that string.

    ex: Please enter a word up to 10 characters long:...
  6. Replies
    51
    Views
    4,952

    haha there we go i knew something was up but i...

    haha there we go i knew something was up but i forgot that my division originally would leave a decimal result which would require a float type variable. As far as my grading goes I know the max...
  7. Replies
    51
    Views
    4,952

    Okay that works wonders i threw in the docking...

    Okay that works wonders i threw in the docking marks and 0 marks for blanks.

    Now the grading system is throwing me off a little bit. Ive done lots of these before, but for some reason i am...
  8. Replies
    51
    Views
    4,952

    even with taking out the docking marks the...

    even with taking out the docking marks the scoring is all kinds of messed up. changed one of the marks to be the exact answer key and it gave me 14 lol.
  9. Replies
    51
    Views
    4,952

    Haha yeah but if not there then why would that be...

    Haha yeah but if not there then why would that be outside of the loop. Also my last studentId and test are being printed twice at the end for some reason :(.
  10. Replies
    51
    Views
    4,952

    well i gave my arrays a larger "play room" by...

    well i gave my arrays a larger "play room" by setting test and answers to 30 and that got rid of the error messages. I just need to see if the scores are right because they are all negative.
  11. Replies
    51
    Views
    4,952

    Yeah but going by that would that not mean i...

    Yeah but going by that would that not mean i would have to do that with all my arrays.
  12. Replies
    51
    Views
    4,952

    Okay yeah i see what you mean it looks alot...

    Okay yeah i see what you mean it looks alot prettier too. Now as far as that whole stack thing goes you have any leads i could look into.
  13. Replies
    51
    Views
    4,952

    # include # include #...

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

    int main()
    {
    int score;
    char answer[21];
    char test[21];
  14. Replies
    51
    Views
    4,952

    haha i wasnt sure if that was how it works so i...

    haha i wasnt sure if that was how it works so i tried to manipulate it. Now that you have cleared that much up i understand how that works and i will never make that make that misunderstanding again....
  15. Replies
    51
    Views
    4,952

    I thought if i did that it would still start at...

    I thought if i did that it would still start at the top of the file and include the answer string as a studentId. Ill try that out thanks for the support.
  16. Replies
    51
    Views
    4,952

    Yes now how would i pull the answer string out of...

    Yes now how would i pull the answer string out of the while()loop without having to process that variable every line. Such that my code would look like.


    while(!feof(grading))
    {...
  17. Replies
    51
    Views
    4,952

    Okay there are going to be 21 items in the answer...

    Okay there are going to be 21 items in the answer string.
    The numbers are from 0 to 20.
    My termination is from 0 to <21 which is 20. ???
    Im not sure where i went wrong.
  18. Replies
    51
    Views
    4,952

    So i have my answer string and then it will go to...

    So i have my answer string and then it will go to the next line so the next thing will be 'A'? I must be doing this wrong.
  19. Replies
    51
    Views
    4,952

    well knowing that the string answers is 20...

    well knowing that the string answers is 20 characters long would that not make my file pointer either 20 or because strings have a null \0 at the end of them 21?
    As for what i would do next would i...
  20. Replies
    51
    Views
    4,952

    Regarding the complex conditional i had that...

    Regarding the complex conditional i had that originally and then thought it may not have been enough, i am not sure why i changed that. For the fseek i put that in so that hopefully it would have...
  21. Replies
    51
    Views
    4,952

    well the above code may look a bit weird my idea...

    well the above code may look a bit weird my idea for the "if(test[i]=='T'&&answer[i]=='T')" was for the loop of i to go through each slot in the arrays and compare the characters that got stored in...
  22. Replies
    51
    Views
    4,952

    haha sounds good any chance you would be able to...

    haha sounds good any chance you would be able to tell me where i am going wrong with my code



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

    int main()
  23. Replies
    51
    Views
    4,952

    haha yeah i am aware of hows it bad. This is...

    haha yeah i am aware of hows it bad. This is twice that you have sent me this message. My teacher has taught me this way and insists that i program the way they have taught me. So for bad programming...
  24. Replies
    51
    Views
    4,952

    Here are the changes i made. ...

    Here are the changes i made.



    while(!feof(grading))
    {
    fgets(studentId, 9 ,grading);
    fscanf(grading, "%s", test);
    printf("%s", studentId);
    printf("%s", test);
  25. Replies
    51
    Views
    4,952

    That just worked wonders thank you. Edit...

    That just worked wonders thank you.
    Edit nevermind i was fooled. When i use fscanf on the string test it still wont read the spaces. Upon reaching a space in the scanf it stops at that point and...
Results 1 to 25 of 36
Page 1 of 2 1 2