Search:

Type: Posts; User: lovelace

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    14,876

    Cheers! I solved it with this loop first. ...

    Cheers!

    I solved it with this loop first.


    while(getline(inout,line))
    {

    And inside the loop I used this!
  2. Replies
    3
    Views
    14,876

    stringstream with getline

    Hey!

    I have been sitting with a problem for some time now, and cant figure out how it can be solved. I have some thoughts about it, and am gonna write that down after I posted the code.


    ...
  3. Replies
    4
    Views
    1,041

    Im not sure I understand what you mean? Im...

    Im not sure I understand what you mean?

    Im trying to search for more then just ".", im scanning a line and I wanna scan for ,.!¤%&/ etc too, can I do that with one find?
  4. Replies
    4
    Views
    1,041

    Search for more symbols with string command

    Hello.

    I have a simple question.

    If I wanna search for . I use this way.



    word.find('.')!= string::npos
  5. Replies
    4
    Views
    9,918

    Ah cheers, ill have a look at it later, thanks...

    Ah cheers, ill have a look at it later, thanks for taking your time for answering :) I didnt know what to expect, but now I got someplace to start :)
  6. Replies
    4
    Views
    9,918

    Replacing dot with comma

    Hey.

    I have been wondering about this for some time now, and when I couldnt get to a solution myself, I tried with google.

    I know there is a function in string to check for the first character...
  7. Replies
    12
    Views
    1,184

    Edit: Deleted it.

    Edit: Deleted it.
  8. Replies
    12
    Views
    1,184

    Thanks for replying to my thread. I were...

    Thanks for replying to my thread.

    I were thinking about it today, why I called it "char stringtab[]" and used the name notation in my swap function. I tried with char **, string stringtab[], but...
  9. Replies
    12
    Views
    1,184

    char fullname[10][80]; for(k= 0; k < 10; k++)...

    char fullname[10][80];
    for(k= 0; k < 10; k++) //(bublesort).
    {
    for(i=0; i < 10 -1; i++)
    {
    if(strncmp(fullname[i],fullname[i+1],20) > 0) // fullname[i] >...
  10. Replies
    12
    Views
    1,184

    Ok, I have now looked at it and tried to solve...

    Ok, I have now looked at it and tried to solve it, but I cant see the logic in it.

    I changed the


    soring_strings(char *stringtab[],int number)

    And now when I try to call it, it says:
  11. Replies
    12
    Views
    1,184

    I see, I defined a char in my function, and that...

    I see, I defined a char in my function, and that is why its only taking one char. My problem is, I can get it to work in main, there I defined a


    char stringtab[10][80]

    But I cant mange to...
  12. Replies
    12
    Views
    1,184

    if(strncmp(stringtab[i],stringtab[i+1],20) > 0) ...

    if(strncmp(stringtab[i],stringtab[i+1],20) > 0)
    {
    swap_strings(stringtab[i],stringtab[i+1]);
    }


    Maybe its because im tired, but why aint it working?
  13. Replies
    12
    Views
    1,184

    yes I need strncmp! jezzzz!

    yes I need strncmp! jezzzz!
  14. Replies
    12
    Views
    1,184

    strcpy copies a whole string. I have like 5...

    strcpy copies a whole string.

    I have like 5 names:
    Hanne, Peter, etc...
    I want them sorted.

    Im not sure I understand what you mean?

    Aint I using it right? It is working if I use it it...
  15. Replies
    12
    Views
    1,184

    Cant manage this sorting function.

    I have been struggling with this Sorting Algoritm for very long now.
    I got it to work with Ints, floats, but not strings?

    It says
    "Incompatible integer to pointer conversion passing 'char' to...
  16. Replies
    9
    Views
    2,928

    Ah yes that makes great sense. I should have...

    Ah yes that makes great sense. I should have figured that out myself, but thanks for clearing that out for me.
    I added this and now it is working. Cheers!


    ...
  17. Replies
    9
    Views
    2,928

    After a few hours I thought I figured out how...

    After a few hours I thought I figured out how this fgets() worked. But now when I push ENTER it writes all strings in my array. Why is that?

    I realised that fgetc put \n in the end, so i found a...
  18. Replies
    9
    Views
    2,928

    Using strncmp to compare input with string

    I have been working with this program for a long time now and I dont know how I can make it work.

    The code is as follows:



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

    int main ()
  19. Replies
    34
    Views
    17,985

    I apologize if this is too much description. But...

    I apologize if this is too much description. But as Tater says, "Select the Mingw Compier", ill try to show you with these screenshots of my own program.

    1. I assume you installed the...
  20. Replies
    18
    Views
    5,956

    Now when im done with my program, I would just...

    Now when im done with my program, I would just like to say thanks for your help with the "Analyse, Plan, Write, Test" It made me struggle more and I got the solution by myself :)

    Ill remember that...
  21. Replies
    18
    Views
    5,956

    Ah great! I made a new char called A, and then...

    Ah great!

    I made a new char called A, and then printed A. Changed the spaces between the dates and now its working :)


    char A = '*';
    printf("%3c",A);

    C-Programming is smart!
  22. Replies
    18
    Views
    5,956

    Ah yeh, im starting to learn how to set my up...

    Ah yeh, im starting to learn how to set my up with the right spaces/tabs, so it looks nice and easy to read.

    But im getting better and better at that though. But again, I just started programming...
  23. Replies
    18
    Views
    5,956

    Yep it feels good :) Yeh I can imagine there...

    Yep it feels good :)

    Yeh I can imagine there is some formatting fixes, but I assume that comes. ;)

    Now when you say "some formatting fixes" do you mean there is some mistakes/errors in the...
  24. Replies
    18
    Views
    5,956

    I ALMOST Solved it! I took your advice, took...

    I ALMOST Solved it!

    I took your advice, took my paper and a pen and started, it took me like 2 hour to figure out how I should do it.

    I started with alot of different solutions and while I...
  25. Replies
    18
    Views
    5,956

    It wasnt my intention to get easy help. It were...

    It wasnt my intention to get easy help. It were my intention to get a start and move on after that.

    But I will try to use paper and pen and figure the problem out, and when I figured out how, I...
Results 1 to 25 of 29
Page 1 of 2 1 2