User Profile

Collapse

Profile Sidebar

Collapse
Noodles
Noodles
Last Activity: Oct 1 '11, 11:25 AM
Joined: Sep 28 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Noodles
    replied to Stack Overflow with getline () ??
    in C
    Hi,

    I just found my mistake in my Program my char array color[6] gets exceeded because of
    Code:
    while (cstring[i]!=' ')
    {
      color[var]=cstring[i];
      var++;
      i++;
    }
    so thanks any way
    See more | Go to post

    Leave a comment:


  • Noodles
    replied to Stack Overflow with getline () ??
    in C
    OK,
    if u want steine to work then ill just send u the appropriate text

    Code:
    int steine[12][8][4];
    OK this should be all

    there is the .txt file in the attachments...
    See more | Go to post

    Leave a comment:


  • Noodles
    replied to Stack Overflow with getline () ??
    in C
    Sorry,

    I am a mix of German and English, so my program is actually written in German
    steine for example means stones.

    Hmm about that std::string.fin d() it actually matters if it reads:
    1 2 O Y G B
    or
    1 2 Y G B O
    and i think when i use this find command it wouldn't really make things easier,
    i think.

    I am not familiar with strings, or i get confused using them,
    since...
    See more | Go to post

    Leave a comment:


  • Noodles
    replied to Saving data into docs and reading it out.
    in C
    Well actually i am writing both into the file, since i need to split number lines i usally write a "-" would this work with these functions too??
    It usually should look like:
    134-34562-78456-34256-345265-

    Thanks
    I love u Banfa i hope u answer all my questions ^-^
    See more | Go to post

    Leave a comment:


  • Noodles
    started a topic Stack Overflow with getline () ??
    in C

    Stack Overflow with getline () ??

    Hi,

    I wrote this Programm it reads out something from a file something like:

    1 2 G O B Y
    11 3 O B B Y

    from a .txt file called anfangsanordnun g.txt.

    However this is the programm:

    Code:
    int main()
    {
        fstream f;
        char cstring[256];
        char color[6];
        int x=0,y=0,var=0,var2=0;
        int zahl;
        
        f.open("anfangsanordnung.txt",
    ...
    See more | Go to post

  • Noodles
    replied to Saving data into docs and reading it out.
    in C
    Code:
    int number[100];
    and it gets numbers written into it
    See more | Go to post

    Leave a comment:


  • Noodles
    started a topic Saving data into docs and reading it out.
    in C

    Saving data into docs and reading it out.

    Hi,

    i am trying to write a programm that will save some information for me in a data file

    Code:
      FILE *f;
      char matrix[100];
      k=0;
      
      f=fopen("SAVE","w");
      while (k<100)
      {
        matrix[k]=char(number[k]);
        k++;
      }
    
      fputs(matrix,f);
    this is the save funktion

    Code:
    
    
    ...
    See more | Go to post

  • Noodles
    replied to scanf problems with strings and chars
    in C
    Ohh,

    Ok thanks i didn't know the command cin, this makes life a lot easier.
    So thanks a lot!!!
    See more | Go to post

    Leave a comment:


  • Noodles
    started a topic scanf problems with strings and chars
    in C

    scanf problems with strings and chars

    Hi,

    Im quite new to C++ and am trying to learn most of the commands.
    So i wanted to make a Programm that has a normal mode and a non normal mode, kindof.
    And i wanted to make a question, which the user has to answer to start normal or unnormal mode.
    I think this code should show my idea.

    The if command never Reacts to a j.
    Why is that??

    Code:
      char jon;
    ...
    See more | Go to post
No activity results to display
Show More
Working...