Search:

Type: Posts; User: Lima

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    3,171

    Yep, that's what I'm using right now. I have...

    Yep, that's what I'm using right now.

    I have to open text files in loop, which means I have to have a variable string which represents the file name each loop, however, for some reason, it is not...
  2. Replies
    5
    Views
    3,171

    One more question. So, I have this file that...

    One more question.

    So, I have this file that has 64 lines of text, just like this:

    11 P 1
    12 P 1
    13 P 1
    ...

    I'd like to extract 11, but 1 and 1, to different integer variables. The same...
  3. Replies
    5
    Views
    3,171

    Thanks! :)

    Thanks! :)
  4. Replies
    5
    Views
    3,171

    fscanf() for a single char

    Hello!

    I'm having trouble to read the following from a .txt file:

    11 P 1



    int main()
    {
  5. Replies
    5
    Views
    1,345

    Oh, that's right, it worked. Thanks! :)

    Oh, that's right, it worked. Thanks! :)
  6. Replies
    5
    Views
    1,345

    I did that, however I did not paste it here. :) ...

    I did that, however I did not paste it here. :)

    The last printf() gives troco=0. That's why I don't get it...
  7. Replies
    5
    Views
    1,345

    Problem with while cycle

    Here it is the code:


    #include <stdio.h>

    int main() {

    float cafe=0.27, troco, d_int=2.00;
    troco=d_int-cafe;
  8. Replies
    6
    Views
    2,813

    Initializing an array inside of a structure

    Hello,

    I have been tried to do this but I keep getting segmentation faults.



    typedef struct
    {
    int *v;
    int x;
  9. Replies
    7
    Views
    5,710

    Yeah, I see my mistake now. :P Thanks. :D

    Yeah, I see my mistake now. :P

    Thanks. :D
  10. Replies
    7
    Views
    5,710

    This line: printf("Thread %u devolveu %d\n",...

    This line:

    printf("Thread %u devolveu %d\n", (unsigned) tids[i-1], *retval[i-1]);

    It was line 46, my bad, pasted the other program output.
  11. Replies
    7
    Views
    5,710

    I get this: f3exercicio1.c: In function...

    I get this:

    f3exercicio1.c: In function ‘main’:
    f3exercicio1.c:36: error: invalid type argument of ‘unary *’ (have ‘int’)

    Oh, I think I get it, thank you once again. No cast needed by the way?
  12. Replies
    7
    Views
    5,710

    array of N pointers

    Hello, I need some help on this:

    Isn't

    int *array[3];

    the same thing as

    int *array = (int*) malloc(3*sizeof(int*)); ??
  13. Replies
    7
    Views
    5,315

    you are working with vectores there not lists

    you are working with vectores there not lists
  14. Replies
    7
    Views
    5,315

    yeah it works now, thanks very much ^^

    yeah it works now, thanks very much ^^
  15. Replies
    7
    Views
    5,315

    incrementing list iterators

    I'm having a little problem here...

    If I have this:
    int N = 5;
    list <type> newlist;
    list <type>::iterator it = newlist.begin();
    it = it + N;

    on the bold line above, it doesn't let me do it,...
  16. Replies
    4
    Views
    922

    Nevermind, I got it. Getline() function. ...

    Nevermind, I got it.
    Getline() function.

    Close topic please.
  17. Replies
    4
    Views
    922

    Yeah you were right, it works now. Thanks. :) ...

    Yeah you were right, it works now. Thanks. :)

    One more thing... If I change the 2nd line of teste.txt, FastFood to Fast Food it won't work.
    Well I know that it skips the spaces, tabs, line...
  18. Replies
    4
    Views
    922

    problem with classes

    I've been trying to seewhat's going on with this program, but can't find anything at all. It compiles but when I execute it nothing appears on the screen.

    This is CCentroComercial.h


    ...
Results 1 to 18 of 18