I have been working on this project and it keeps coming back with errors I originaly had 133 errors and have limited it to 10...please see the error message below; Below that is the Pseudo Code....Any help would be cool
1>------ Build started: Project: Project test, Configuration: Debug Win32 ------
1>Compiling...
1>Project test.cpp
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(6) : error C2059: syntax error : 'string'
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(37) : error C2059: syntax error : 'string'
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(45) : error C2059: syntax error : 'string'
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(83) : error C2059: syntax error : 'string'
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(98) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(100) : error C2065: 'Case' : undeclared identifier
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(100) : error C2146: syntax error : missing ';' before identifier 'MEXICAN'
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(100) : error C2470: 'MEXICAN' : looks like a function definition, but there is no parameter list; skipping apparent body
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(101) : error C2059: syntax error : '='
1>c:\users\cliff\documents\visual studio 2008\projects\project test\project test\project test.cpp(124) : fatal error C1004: unexpected end-of-file found
1>Build log was saved at "file://c:\Users\Cliff\Documents\Visual Studio 2008\Projects\Project test\Project test\Debug\BuildLog.htm"
1>Project test - 10 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The Pseudo,
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
"Main Module"
"Declare currency Type as Integer"
"Declare international Value as real"
"Declare US Value as real"
Do While user wants to
continue
Display Menu
Get International Value
Convert Currency
Display Results
End loop
Print exit message
End Main Module
Display Menu
Declare continue as Boolean
Set
continue = true
While
continue = true
Display
"Welcome to the international currency conversion program"
Display
"Please make a selection,"
Display
"International Currency Types:,"Display "1: Canadian Dollars"
Display
"2: Mexican Pesos" Display "3: English Pounds"
Display
"4: Japanese Yen" Display "5: French Francs"
Display
"6: Quit"
Display
"Enter a selection:";
"Input currency Type"
'If' currency Type >= 1 AND currency Type <= 5 then
Set
continue = falseElse if currency Type = 6
Display “Quitting Currency Conversion”
Continue =
false
Else
Display Error 4:
"Invalid menu selection."
Continue =
true
End
if
End While
End Display Menu
Get International Value
Declare value as integer
Declare continue as Boolean
Set
continue = true
While
continue = true
Display
"Enter a currency value (positive number): "
Input international Value
If international Value > 0 AND internationValue <= 1000000 then
Continue =
false
Else
Display “
"Error 1: Invalid input--Negative Number"
Continue =
trueEnd if
End
while
End Get International Value
Convert Currency
Declare rate as real
Select Case of currency Type
"Case 1:"
Set rate = 1.4680
"Case 2:"
Set rate = 9.5085
"Case 3:"
Set rate = .6085
"Case 4:"
Set rate = 104, 9;
"Case 5:"
Set rate = 6.2561
"Default:"
Set rate = 0.0
End Case
US Value = rate * international Value
End Convert Currency
Display Results
Declare nation as string
Declare currency as string
Select Case of currency Type
Case CANADIAN:
Nation =
"Canadian"
"Currency" = "Dollars"
/Case MEXICAN:
Nation = "Mexican","Currency" = "Pesos",
Case ENGLISH:
nation =
"English","currency" = "Pounds",
Case JAPANESE:
nation = "Japanese",Currency = "Yen",
Case FRENCH:
nation =
"French",Currency = "Francs",
Default:
Nation = "No country",Currency = "",
End Case
If currency <> “” then
Display “The value of “, international Value, “ “ , nation, “ “, currency, “ is “,
us Value, “ dollars”
Else
Display
"Error 5: Invalid currency type."
End
if
End Display Results
Enter your message below
Sign in or Join us (it's free).