Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6978087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:42:37+00:00 2026-05-27T17:42:37+00:00

I have a 2D figure made from straight lines. The figure’s edges have coordinates

  • 0

I have a 2D figure made from straight lines.

The figure’s edges have coordinates from type double. The coordinates’ values are stored in an object called Dot.

The data related to a line (is the line ascending or descending, the values of “a” and “b” in “a * X + b == Y” etc.) is stored in an object called Line. The Line class also has two Dot objects for the two ends of every line. The Line class also has 2 functions/methods and one constructor. The constructor has no arguments. The first function/method has no arguments and the second one has. Both functions/methods are created in order to change all the data automatically when ever necessary.

I insert the number of the sides of the figure and the coordinates of the edges after I start the program. Later the program has to write on the screen everything about every line. No matter what coordinates I insert, the coordinates of the first dot are X = -9,25596e+061 and Y = -9,25596e+061. But the other dots have the coordinates I have originally inserted.

There is one line that I add to a vector as much times as the number of the sides of the figure. After that I start changing the values of the coordinates of the edges of the figure (by inserting the values in the running program). The third action is to call the function/method that “creates” the lines (It calculates the rest of the data about the line). The fourth step of the program is to write on the screen the data about every line.

I have been searching for a problem in the algorithm and the code. I haven’t found anything.

I’m using Visual C++ 2010 Express. I am also using the iostream and vector libraries.

So why are the X and Y coordinates of the first edge changing their values to -9,25596e+061?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:42:38+00:00Added an answer on May 27, 2026 at 5:42 pm

    OK, the problem appeared to be in the code. I haven’t been initializing right… Had to swap the places of two variables in order to fix the problem. Thanks to Hans Passant and Baltram I figured where to search for the problem: when calling elements from any type of array.

    Yeah, always be careful when doing such things.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string value from a user input box. I have to figure
I have been trying to figure out a way to tag several methods from
i have made an app that would calculate numbers from input fields. **main Activity
I have made the move from TextMate to VIM. I can not use macvim,
I have tried to figure out how to disable the header for a jqGrid,
I need to learn RegEx but don't have time to figure this out right
I have been trying to figure out a solution but nothing has really presented
I have been trying to figure this out for way to long tonight. I
I have a Path (a star figure): <Path x:Name=NiceStar StrokeThickness=10 Stroke=#ff000000 StrokeMiterLimit=1 Data=F1 M
I have search through the web to figure this out but no luck. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.