I have input string in shape of:polygons=[(4,5),(6,8),(5,3),(11.4,6);(3,8),(2,9),(1,2)],each semicolon tells me 1polygon entered user can input up to 100 polygons and 100 points in each polygon i want to store the x- coordinates of all points in 2D array how can i do that in c++? User can input any value for the points
Khaled_9
0
Newbie Poster
Recommended Answers
Jump to PostA 100x100 array of integers is only 40kbytes, so that's perfectly feasible in most environments. Just loop through the input keeping one index for the current polygon and one for the current point. Or you may be better advised to use linked lists for the polygons and the points in …
All 2 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
AssertNull
1,094
Practically a Posting Shark
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.