Computerhilfen.de Logo
Forum
Tipps
News
Frage stellen

C Programmieren / assignment makes integer from pointer without a cast

Hallo,
in Zeile 19 kommt die Meldung "assignment makes integer from pointer without a cast" und in Zeile 21 "format '%s' expects argument of type 'char *', but argument 2 has type 'int'", was dazu führt, dass beim Ausgeben des Arrays nur "(NULL)" kommt und nicht "n.n." wie gewollt.
Wäre über eine Lösung sehr dankbar.
Ich habe einen Tipp bekommen es mit strcpy zu lösen habe es damit aber auch nicht geschafft.
Viele Grüße
Alex


Antworten zu C Programmieren / assignment makes integer from pointer without a cast:

It is deprecated in C to use a non-const char* to point to string constants -- you should change src to be of type const char*

Thank you for your answer. With const i get a warning but its right to use the pointer Thanks. My Code dont have any warnings now but printf dont give anything out in console.


« PythonTurbo-Pascal Dreieck berechnen »
 

Schnelle Hilfe: Hier nach ähnlichen Fragen und passenden Tipps suchen!

Fremdwörter? Erklärungen im Lexikon!
Quellcode
Ein Quellcode, auch als Quelltext bekannt, bezeichnet den unkompilierten Programm-Code einer Software. Quell- oder Programm-Code ist der auch für Menschen lesbare Co...

Unicode
Unicode ist ein international anerkannter Standard, der als universeller Zeichencode ("Universal Code") dient und durch das Unicode-Konsortium entwickelt und verwaltet wi...

QR-Code
QR-Codes, die Abkürzung für "Quick Response Codes", sind eine Form von zweidimensionalen Barcodes. Damit lassen sich Informationen schnell und effizient speiche...