b77f
![]() |
|
|
|
|
|||||||
| Userland Programming & Scripting C, Shell, Perl, Sed & Awk |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
I get segfault at
f s c a n f i don't understand why i get segfault input.dat has: 10 Xasdf sorry, when i write that normal, i get error. Last edited by graudeejs; December 4th, 2009 at 20:51. |
|
#2
|
||||
|
||||
|
That's because you haven't allocated space for name.
Either use the new operator or define its size statically i.e. char name[WHATEVER]. |
| The Following User Says Thank You to anemos For This Useful Post: | ||
graudeejs (February 12th, 2009) | ||
|
#3
|
||||
|
||||
|
You should learn about C++ strings and iostreams or stick to C.
Here is a good resource about C++ : http://bruce-eckel.developpez.com/livres/cpp/ticpp/.
__________________
:wq |
|
#4
|
|||
|
|||
|
I would recommend to start learning C instead of C++
|
|
#5
|
||||
|
||||
|
Second that!
Alphons (admitting that tastes may differ though)
__________________
Ken sent me. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| test | graudeejs | Off-Topic | 3 | February 11th, 2009 10:48 |
| 6.4 Release - Bug Already - Didn't Anyone Test It? | ter2007 | Installing & Upgrading | 23 | December 7th, 2008 21:03 |