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...
Type: Posts; User: Lima
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...
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...
Thanks! :)
Hello!
I'm having trouble to read the following from a .txt file:
11 P 1
int main()
{
Oh, that's right, it worked. Thanks! :)
I did that, however I did not paste it here. :)
The last printf() gives troco=0. That's why I don't get it...
Here it is the code:
#include <stdio.h>
int main() {
float cafe=0.27, troco, d_int=2.00;
troco=d_int-cafe;
Hello,
I have been tried to do this but I keep getting segmentation faults.
typedef struct
{
int *v;
int x;
Yeah, I see my mistake now. :P
Thanks. :D
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.
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?
Hello, I need some help on this:
Isn't
int *array[3];
the same thing as
int *array = (int*) malloc(3*sizeof(int*)); ??
you are working with vectores there not lists
yeah it works now, thanks very much ^^
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,...
Nevermind, I got it.
Getline() function.
Close topic please.
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...
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
...