@nonoob: what do you mean by subtotals? Is this a similar thing to what I was proposing? Basically that you change the reading of the columns to reading of rows in the second matrix? This would...
Type: Posts; User: naturegirl
@nonoob: what do you mean by subtotals? Is this a similar thing to what I was proposing? Basically that you change the reading of the columns to reading of rows in the second matrix? This would...
This time I can't write *rofl* Maybe it has to do with that I come here at the end of my day, and it's quite late here and English is not my first language :)
I meant column instead of row :)
Wow didn't know there were so many secrets. Thanks for sharing!
Yes that's what he means.
With the return value of scanf you want to check how many inputs you have scanned and converted correctly, and only if the number matches 3 you want to continue
ok. hehe, I see^^
If writing in C, you couldn't read the file and display the progress bar at the same time. So you'd have to think of a way to switch between these two things you want to do. How would you do that?
Talking about matrix multiplication. If you want to speed up your algorithm, I've heard that by transposing the second matrix, so that you can multiply line by line instead of line by row, it will be...
Oh I see! Thanks :) Hm weird, what did the error about the double free mean then?
I thought it meant the first free, because when I removed it, the program worked fine.
Again I can't read =__= I'm really sorry everyone, now this already happened the second time. btw are there some other guidelines I should know about? Like when I should post code example, or if it's...
There's an issue in free().
You're pointers are like this. ptr_rows <-- user_ptr <-- elem_ptr
So esentially the latter 2 are all pointing to the memory of ptr_rows.
This means you only need to do...
I'm a bit confused about the definition of permutation.
Say I have "abc". Then permutations would be abc, acb, bac, bca, cab, cba right?
So the same characters but just in different positions?
So...
Yup, you definitely need to make sure you know what data types your variables are. In your corrected version it's also mixed up between printf and scanf.
but I thought the child process stops after "exit" ?
Same question as fjidd.
And generally it's very bad style to have that many encapsuled for loops. As already pointed out, each layers adds a level of complexity, which in your case would be O(n^8)...
supppose n is the number of lines, and you have read in the data till now:
int n; // suppose number of lines
int cnt = 0;
for (i = 0; i < n; ++i) {
if...
ok, guess I can't read =_=
I didn't see anything wrong in line 5 either...
Hm I can't debug it without the whole code. But that algorithm was also an assignment I did =)
so you're saying description_nametraveller is a char array and onoma is an integer?
Why the assignment then?
Read and try the code I posted. It will print it out the way you wanted.
Just because what's printed out is 2 dimensional, doesn't mean your array has to be...
well, it doesn't compile...
I don't know where you get the functions inserisci(), visualizza() from.
It would also help if it where english...
Yup, as he points out there's something wrong with these two variables. Take a look at mine again and see what's different :)
The problem lies in your result variable in evaluate_one()
Try adding a default case to check to print out an error message in the swith(op) statement.
Somehow you didn't pop the op correctly, and...
is this an OS class?^^
ok, so the special thing about fork() is its return value. When in the child process it returns 0 and when in the parent process it doesn't. So this way it can be used to...
did you mean my code in line 49?
Hm not really sure, mine was just compiled with gcc, so I also had to remove the parts system("cls")
Maybe string refers to the variables "menu" or "questions"...
It doesn't actually make a difference when you actually use the array.
It's more a difference in where exactly the variable in memory is stored, but that doesn't have to concern you too much i...