Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
Project 3 Star Gazing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Walsh
Project 3 Star Gazing
Commits
4c564f44
Commit
4c564f44
authored
Mar 18, 2019
by
Elon Bontemps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autosave
parent
4d66494b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
45 deletions
+44
-45
Countries/countries.cpp
Countries/countries.cpp
+2
-3
Countries/countries.h
Countries/countries.h
+2
-1
Countries/countries.txt
Countries/countries.txt
+39
-40
Input stuff/Functions.cpp
Input stuff/Functions.cpp
+1
-1
No files found.
Countries/countries.cpp
View file @
4c564f44
...
...
@@ -12,7 +12,7 @@ map<string, pair<double, double>> mapMaker() {
fin
.
open
(
"countries.txt"
);
//variables
map
<
string
,
pair
<
double
,
double
>>
tempMap
()
;
map
<
string
,
pair
<
double
,
double
>>
tempMap
;
pair
<
double
,
double
>
tempPair
;
string
placeName
;
...
...
@@ -26,7 +26,6 @@ map<string, pair<double, double>> mapMaker() {
getline
(
fin
,
tempPair
.
first
,
'.'
);
getline
(
fin
,
tempPair
.
second
,
'\n'
);
tempMap
.
emplace
(
placeName
,
tempPair
);
placeName
.
clear
();
}
return
tempMap
;
}
\ No newline at end of file
}
Countries/countries.h
View file @
4c564f44
#include <string>
using
namespace
std
;
//functions
//function that return maps of pairs
map
<
string
,
pair
<
double
,
double
>>
mapMaker
;
Countries/countries.txt
View file @
4c564f44
//North America
Seattle, Washington
Boise, Idaho
Helena, Montana
Saint Paul, Minessota
Madison, Wisconson
New York, New York
,
Augusta, Maine
Los-Angeles, California
Salt Lake City, Utah
Topeka, Kansas
Raleigh, North Carolina
Austin, Texas
Miami, Florida
Seattle, Washington
. 47.6062° N. 122.3321° W
Boise, Idaho
. 43.6150° N. 116.2023° W
Helena, Montana
. 46.5891° N. 112.0391° W
Saint Paul, Minessota
. 44.9537° N. 93.0900° W
Madison, Wisconson
. 43.0731° N. 89.4012° W
New York, New York
. 40.7128° N. 74.0060° W
Augusta, Maine
. 44.3106° N. 69.7795° W
Los-Angeles, California
. 34.0522° N. 118.2437° W
Salt Lake City, Utah
. 40.7608° N. 111.8910° W
Topeka, Kansas
. 39.0473° N. 95.6752° W
Raleigh, North Carolina
. 35.7796° N. 78.6382° W
Austin, Texas
. 30.2672° N. 97.7431° W
Miami, Florida
. 25.7617° N. 80.1918° W
//South America
Bogota, Columbia
Brasilia, Brazil
Buenos Aires, Argentina
Bogota, Columbia
. 4.7110° N. 74.0721° W
Brasilia, Brazil
15.8267° S. 47.9218° W
Buenos Aires, Argentina
34.6037° S. 58.3816° W
//Africa
En Nahud, Sudan
Agadez, Niger
Kiffa, Mauritana
Fes, Morocco
Gamba, Gabon
Kindu, Democratic Republic of the Congo
Namacunde, Angola
Lugela, Mozambique
Camarvan, South Africa
Ihosy, Madagascar
En Nahud, Sudan 12.6948° N. 28.4280° E
Agadez, Niger 16.9742° N. 7.9865° E
Kiffa, Mauritana 16.8740° N. 11.4339° W
Fes, Morocco 34.0181° N. 5.0078° W
Gamba, Gabon 2.7405° S. 10.0304° E
Kindu, Democratic Republic of the Congo 2.9492° S. 25.9231° E
Namacunde, Angola 17.3082° S. 15.8452° E
Lugela, Mozambique 16.3693° S. 36.7820° E
Ihosy, Madagascar 22.4009° S. 46.1279° E
//Europe
Afif, Saudi Arabia
Buky, Ukraine
Paris, France
Bor, Russia
Nagpur, India
Naggu, Tibet
Afif, Saudi Arabia
23.9052° N. 42.9125° E
Buky, Ukraine
49.0945° N. 30.4051° E
Paris, France
48.8566° N. 2.3522° E
Bor, Russia
56.3588° N. 44.0767° E
Nagpur, India
21.1458° N. 79.0882° E
Naggu, Tibet
31.4762° N. 92.0512° E
//Asia
Golong, China
Bogd, Mongolia
Quanzhou, Fujian
Busan, South Korea
Nagoya, Japan
Bogd, Mongolia 44.6692° N. 102.1719° E
Quanzhou, Fujian 24.8741° N. 118.6757° E
Busan, South Korea 35.1796° N. 129.0756° E
Nagoya, Japan 35.1814° N. 136.9064° E
//Australia
Kalgorie, Australia
Coober Pedy, South Australia. 231 . 23412
Kalgorie, Australia 30.7490° S. 121.4660° E
Coober Pedy, South Australia. 29.0139° S. 134.7533° E
Newman, Western Australia. 23.3593° S. 119.7350° E
Sydney, Australia 33.8688° S. 151.2093° E
//
Input stuff/Functions.cpp
View file @
4c564f44
...
...
@@ -97,7 +97,7 @@ int hourPrompt (int hour) {
int
minutePrompt
(
int
minute
)
{
do
{
cout
<<
"Enter minute: "
;
if
(
!
(
cin
>>
minute
))
{
// validates that numbers were entered and checks input
if
(
!
(
cin
>>
minute
))
{
// validates that numbers were entered and checks input
cerr
<<
"Error! Please enter a valid integar."
<<
endl
;
cin
.
clear
();
cin
.
ignore
(
1000
,
'\n'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment