I can't able call the 49th line function in the c programming | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
22nd Jul 2021, 4:20 PM
KODURU VIVEK SAI REDDY
KODURU VIVEK SAI REDDY - avatar
2 Antworten
+ 2
I haven't read the code in detail, but the first error is that on line 54, you are doing `(ptr + i)->Type == "Savings"` Using the == operator with strings is undefined behaviour in C. This is because C-strings are actually char-array pointers, and with the == operator, you are comparing the pointers. Use strcmp() in the <string.h> header instead https://www.cplusplus.com/reference/cstring/strcmp/
22nd Jul 2021, 7:04 PM
XXX
XXX - avatar
+ 2
"I can't able call the function in the c programming". Which function? Which line? And your code is poorly written. Before writing code make sure to learn how to properly ask questions.
22nd Jul 2021, 5:19 PM
Carbon
Carbon - avatar