Phil
Phil
did you took the last update with the line 22 for(unsigned in i=1 ...
Ehsan
Phil
what did you enter in args ?
Phil
Ehsan
your problem is probably in line 41 the while loop
Ehsan
you need to add a condition to check if ther’s actually an x 🙂
Phil
are you sure that this will correct the bug ??
Phil
Everything works if you use a->len
Ehsan
Phil
Ok i got something :
-2.000000 6 ///polynome->p[0]
4.000000 2 ///polynome->p[1]
4.000000 2 ///r->p[0]
0.000000 0 ///r->p[1]
r->p[0] is connected to polynome->p[1]
Ehsan
https://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting
this is good code style standards follow them as much as you can
Ehsan
Ehsan
I know you can do it by yourself it’s simple
Phil
ok I'll try that
Ehsan
https://users.ece.cmu.edu/~eno/coding/CCodingStandard.html#names
Also this will help you in the future
Ehsan
good luck
Phil
but I made tests and when I have Ax^B if A is missing it gives me 0
Phil
Ok I understand that you must go, thank you for all
Ehsan
good luck
I said “you might”. If you know it’s working then great
Phil
I just checked in the man and it's specified to return Zero if doesn't found
Anonymous
We could rewrite the parsing, but wasn't the parsing already working? It does print in a different style when exponents are out of order BTW.
Phil
-2.000000 6 34362146824 34362146828 polynome
4.000000 2 34362146832 34362146836 polynome
4.000000 2 34362146832 34362146836 r
0.000000 0 34362146840 34362146844 r
the col 1 & 2 are values and the col 3&4 are addresses
Phil
you can see that r->p[0] is connecting to polynome->p[0]
Phil
Ok I finally solved that by assigning manually the address in derv() :
Polynome *r=(Polynome* ) malloc(sizeof(Polynome));
r->p = &polynome->p[polynome->len] ;
//r->p = (Monom*) malloc(polynome->len);
r->len = polynome->len;
Phil
I don't know if this is consider as acceptable
Phil
maybe I'll add an realloc to have enough space
robherc
Anonymous
maybe I'll add an realloc to have enough space
I made a version too, it could still use some work...
https://pastebin.com/zR05FBpD
Oops, it fails to take derivative of a constant!
Oops, the parsing doesn't account for implied coefficient +/- one.
Oops, it prints unnecessary exponent on power of one terms.
Anonymous
Streams in C++ what does it mean?
Anonymous
Ehsan
Anonymous
hi guys please i need a c++ programmer for a simple task
it doesn't take more than 30minutes and paid of course
Anonymous
guys anyone who have c++ questions please
Anonymous
I got a question: In C++ after setting a stream's output field width, how do you reset it to default?
Anonymous
Nevermind, this explained it. C++ output is still frustratingly awkward.
https://www.geeksforgeeks.org/stdsetbase-stdsetw-stdsetfill-in-cpp/
labyrinth
when using gtest in c++
Mahdi
Hi. I wanted the C libraries to have a site you know.
Anonymous
labyrinth
is it normal to see " namespace has no member {Return,DoAll,SetArgPointee}"
Anonymous
Mahdi
Wojak
Mahdi
Friends help thank you
Anonymous
Mahdi
I wanted the C libraries. I want to know how many libraries he has.
Anonymous
Mahdi
Anonymous
Mahdi
What job?
By the way, what can I do with the C.
Anonymous
Anonymous
But learn English first
Mahdi
Like what
Anonymous
Mahdi
Anyone with C++ android app iOS wrote
Mahdi
؟؟
Pavel
Anonymous
Vlad
Mahdi
Pavel
There are some people who did write iOS apps using C.
Is it the answer you wanted?
Imtiaz
/get cbook
Mahdi
Mahdi
ios apps
Mahdi
Mahdi
For C and c++ training
Mahdi
Help friends
Vlad
We won't help you if we don't comprehend what on earth are you saying which is the case
Mahdi
Mahdi
Pavel
I need training🥺🥺
Find some cources on the internet. If you have specific questions about C/C++ we can answer them, just be specific (and read about how to ask good questions).
If you want to find a tutor, there are some websites where you can find one (again, google it).
Mihai
I need training🥺🥺
don't expect people to be your teacher, start learning by yourself, searching on google, wikipedia and youtube.