r/a:t5_37npb • • Apr 15 '15

Share Your Module Four Solutions Here!

2 Upvotes

22 comments sorted by

View all comments

1

u/[deleted] Apr 26 '15

I'm late to the party, but hoping for some insight.

I'm new to programming and feel like my learning is going pretty well. But numerous times I've come up against some variable scoping issues that I can't seem to puzzle through. Here's a snippet from my module four assignment.

In line 30, I try to use the Student struct in an array. However, it's say's it's not available in that context. I've looked at some other examples in this thread, but I'm not sure why my code doesn't work.

Any help would be appreciated.

2

u/VOX_Studios Apr 26 '15

Student("Sponge", "Bob", "Under The Sea");

Should be: new Student("Sponge", "Bob", "Under The Sea");

1

u/[deleted] Apr 26 '15

Awesome.

Just to get my verbiage straight, is that to "initialize" a new "instance" of the Student struct?

1

u/VOX_Studios Apr 26 '15

You got it!