You are viewing our Forum Archives. To view or take place in current topics click here.
[Coding][C] Need help with a function
Posted:

[Coding][C] Need help with a functionPosted:

Suis
  • Ladder Climber
Status: Offline
Joined: Oct 15, 201013Year Member
Posts: 303
Reputation Power: 10
Status: Offline
Joined: Oct 15, 201013Year Member
Posts: 303
Reputation Power: 10
So I attempted this but cant figure out what i am supposed to do for the bright spots part.

[ Register or Signin to view external links. ]


Last edited by Suis ; edited 2 times in total
#2. Posted:
Xaldin
  • 2 Million
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
what error are you getting?
Also arraydata isnt being called right now.
#3. Posted:
Suis
  • Ladder Climber
Status: Offline
Joined: Oct 15, 201013Year Member
Posts: 303
Reputation Power: 10
Status: Offline
Joined: Oct 15, 201013Year Member
Posts: 303
Reputation Power: 10
Xaldin wrote what error are you getting?
Also arraydata isnt being called right now.


This is what i get when i compile.
[ Register or Signin to view external links. ]
#4. Posted:
Xaldin
  • TTG Addict
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
Size has to be known at compile time to pass an array of arrays, youll have to use a dynamically allocated array or another way of simulating the same thing.

[ Register or Signin to view external links. ]
#5. Posted:
Suis
  • Ladder Climber
Status: Offline
Joined: Oct 15, 201013Year Member
Posts: 303
Reputation Power: 10
Status: Offline
Joined: Oct 15, 201013Year Member
Posts: 303
Reputation Power: 10
Xaldin wrote Size has to be known at compile time to pass an array of arrays, youll have to use a dynamically allocated array or another way of simulating the same thing.

[ Register or Signin to view external links. ]


okay so, if my size can be a maximum of 500 should i use 500?
#6. Posted:
Xaldin
  • 2 Million
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
Suis wrote
Xaldin wrote Size has to be known at compile time to pass an array of arrays, youll have to use a dynamically allocated array or another way of simulating the same thing.

[ Register or Signin to view external links. ]


okay so, if my size can be a maximum of 500 should i use 500?

yea that should work, compiler just needs a size to work with. Try it and see if it works
#7. Posted:
Suis
  • Ladder Climber
Status: Offline
Joined: Oct 15, 201013Year Member
Posts: 303
Reputation Power: 10
Status: Offline
Joined: Oct 15, 201013Year Member
Posts: 303
Reputation Power: 10
Xaldin wrote
Suis wrote
Xaldin wrote Size has to be known at compile time to pass an array of arrays, youll have to use a dynamically allocated array or another way of simulating the same thing.

[ Register or Signin to view external links. ]


okay so, if my size can be a maximum of 500 should i use 500?

yea that should work, compiler just needs a size to work with. Try it and see if it works


okay so update,

my new problem is my scanf in my arrayData function is returning only zeros. here is the code that i wrote

Edit: nvm i got it
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.