Stop Microsoft
Welcome,
Guest
. Please
login
or
register
.
Have you missed your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length.
News:
Home
Help
Login
Register
Stop Microsoft
»
Miscellaneous
»
Programming & Networking
»
quick C question
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: quick C question (Read 1181 times)
Stryker
VIP
Member
Posts: 1,258
Kudos: 41
quick C question
«
on:
1 September 2003, 13:45 »
aside from the fact that it's useless, what's wrong with this code? At the very end, after the last printf() i get a segmentation fault.
thanks
Code:
[Select]
Logged
flap
Member
Posts: 1,268
Kudos: 137
quick C question
«
Reply #1 on:
1 September 2003, 13:59 »
Change this
for (x=1;x<9;x++)
to
for (x=0;x<8;x++)
Arrays are indexed from 0, not 1. i.e. your array is indexed from 0 to 7, not 1 to 8.
Logged
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara
http://counterpunch.org
http://globalresearch.ca
Stryker
VIP
Member
Posts: 1,258
Kudos: 41
quick C question
«
Reply #2 on:
1 September 2003, 14:05 »
i knew that, i was just testing ya
thanks
Logged
xyle_one
VIP
Member
Posts: 2,213
Kudos: 135
quick C question
«
Reply #3 on:
30 October 2003, 04:11 »
itm
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Stop Microsoft
»
Miscellaneous
»
Programming & Networking
»
quick C question