need help with undefined and must have class struct union errors and imputing switchcase?

here is my code I am getting simple errors like unneeded int cin and cout undefined any help given is apprciated
#include <iostream>
#include <stack>
#include <iomanip>






using std::hex;

int main(int argv, char arg[]){
int number_c;
int ST;
int stack;
while (1<2){
std::cout<< "this is a decimal to hexidecimal converter" << std::endl;
std::cin >> number_c;
std::cout << number_c << " converted to hexidecimal is: " << hex << number_c <<std::endl;int number_c;
return 0;
{
stack<int> ST;

// Store input
int input;

// Store numbers off stack
int decimal;

////////// LOOP THIS
// Retrieve and store input
cin >> input;

// Push input onto stack
ST.push(input);
////////////

/////////// LOOP THIS TOO
decimal = ST.top();
ST.pop();
///////////

// FOR DEBUG PURPOSES
// PORPOUISES
cout << decimal;
}

}
}
Last edited on
1
2
3
4
std::cout << number_c << " converted to hexidecimal is: " << hex << number_c <<std::endl;int number_c; // remove the second definition of number_c
return 0;
{ // what is the following code good for? return 0; ends the function
stack<int> ST;
Topic archived. No new replies allowed.