Hello,

There's probably a very simple solution to this but i'm having some trouble figuring it out. How do i enter X numbers into an array without using "enter" after each input ? I'd like to separate them with spaces. For example:

int array[5];

when i'd enter numbers into it, it'd have to look like this:

1 2 3 4 5

and not:
1
2
3
4
5

Thanks in advance!

It is quite likely that your current code may do just that.

Oh god, you're right, it was ok all along. Gotta pay more attention next time i guess.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.