Search:

Type: Posts; User: popnfresh12321

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    614

    Convert String to arithmetic

    I've got this string:


    char * string = "2+2";

    I want to get an integer value = 4 from this. How would I go about doing this.

    Thanks
  2. Then I do not understand what is wrong with this:...

    Then I do not understand what is wrong with this:



    void pickDoubleMu(teams * sPtr, matchups * head)
    {
    int i = 0;
    char *outputText = "output.txt";
    FILE *output =...
  3. Will that keep the update of count?

    Will that keep the update of count?
  4. How to reset to the beginning of a linked list?

    I have a function that will look something like this:



    void function(node* root, int num)
    {
    int i = 0;

    while(i < 10)
    {
  5. Replies
    1
    Views
    683

    Parsing Help

    I ran this on two compilers. One gave me a seg fault, the other runs it fine.


    void parse(char *line)
    {
    char temp;
    int i;
    int j;
    int k, l;
    int length = 0;
  6. Replies
    4
    Views
    10,153

    Now the strcpy portion causes a segfault. Any...

    Now the strcpy portion causes a segfault. Any ideas?
  7. Replies
    4
    Views
    10,153

    Scanf into a array of strings

    char *titles[10];

    int main(void)
    {
    int i;
    char *temp;

    for(i = 0; i < 10; i++)
    {
    printf("Enter Team Name %d: ", i + 1);
  8. Replies
    1
    Views
    891

    The commented out portion in updateCount and...

    The commented out portion in updateCount and checkCount are how I had it with the struct.
  9. Replies
    1
    Views
    891

    Infinite Loop/ General Help

    What I'm trying to do is create a schedule generator for a fantasy football league. The key things that need to happen are:
    -- that all 10 teams have to play every other team in the league once....
  10. Replies
    12
    Views
    1,071

    New Problem: After fixing the function above so...

    New Problem:
    After fixing the function above so it's completely functional, I have another problem.

    I need to use this function several times to generate different random results. However, it...
  11. Replies
    12
    Views
    1,071

    Ah. Thanks. My solution was that whenever there...

    Ah. Thanks. My solution was that whenever there was a duplicate I would set j = i so the loop would end. Thanks for all the help. It works now
  12. Replies
    12
    Views
    1,071

    Ah. that is probably the problem. Any ideas on...

    Ah. that is probably the problem. Any ideas on an easy fix?
  13. Replies
    12
    Views
    1,071

    Well I'm creating a schedule generator and the...

    Well I'm creating a schedule generator and the number values in the teams array represent teams. And I want to make sure no two teams play twice in the same week. I also wanted the weekly matchups...
  14. Replies
    12
    Views
    1,071

    Perhaps some helpful information. I changed...

    Perhaps some helpful information. I changed
    while(weeklyUsed[i] == weeklyUsed[i + 1] || res == 0);

    to

    while(weeklyUsed[i] == weeklyUsed[i + 1] || res != 0);

    and it gave me an infinite...
  15. Replies
    12
    Views
    1,071

    My last three outputs were: 21 27 27 25 21 26...

    My last three outputs were:

    21 27 27 25 21 26 23 28 25 23
    24 23 23 25 22 30 25 22 26 28
    30 25 22 23 22 29 29 25 25 21

    The problem comes when I'm checking all the previous with the current...
  16. Replies
    12
    Views
    1,071

    'i' will never be 9 since I increment by 2 and it...

    'i' will never be 9 since I increment by 2 and it runs while i < 10.
  17. Replies
    12
    Views
    1,071

    Problems with Looping

    I have the following global array:


    int teams[10]= {21, 22, 23, 24, 25, 26, 27, 28, 29, 30};

    I want to randomly take all of these values and put them into a separate array. Whenever I run...
  18. Replies
    4
    Views
    1,097

    Combining two strings

    I'm trying to create a schedule generator.
    I have global variables of


    char *team1 = "random name";
    char *team2 = "someone else";


    What I want to do is make a different string that will be
  19. Replies
    9
    Views
    1,057

    wow. that would've made things a lot easier

    wow. that would've made things a lot easier
  20. Replies
    9
    Views
    1,057

    I got a new compiler that I figured out. But it...

    I got a new compiler that I figured out. But it always saves every compiled program under the same name
  21. Replies
    9
    Views
    1,057

    C and I'm using a school server that has gcc. ...

    C and I'm using a school server that has gcc.
    I have windows
  22. Replies
    9
    Views
    1,057

    Any recommendations on which compiler I should...

    Any recommendations on which compiler I should use? The one I'm using does not to that. It only creates a temporary executable
  23. Replies
    9
    Views
    1,057

    Running a C program independently

    I have a .c file completely done. Is there a way to make it an executable file so I can just click on it and the program will just run, without going through weird compilers?

    So I can give it to...
  24. Replies
    5
    Views
    878

    Nvm. Figured it out. All I had to do was put...

    Nvm. Figured it out. All I had to do was put check = 0; into the do while loop
  25. Replies
    5
    Views
    878

    I assume the infinite loop problem is with the do...

    I assume the infinite loop problem is with the do while loop. But can't find it
Results 1 to 25 of 39
Page 1 of 2 1 2