Ahoy folks,
As I am unsure whether this is a compiler or code::blocks issue I will post here.
I have recently installed Code::Blocks 13.12 on my computer running OS X 10.9.4 (Mavericks).
I have GNU GCC as my compiler. I have copied down code from my book, that is supposed to be a demo first program:
//
// Conversion - Program to convert temperature from Celsius degrees into Fahrenheit:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main (int nNumberofArgs, char* pszArgs[])
{
//enter the temperature in Celsius
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius;
//calculate conversion factor for Celsius
//to Fahrenheit
int factor;
factor = 212 - 32;
//use conversion factor to convert Celsius
// into Fahrenheit Values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
//output the results (folloed by a NewLine)
cout<< "Fahrenheit value is:";
cout<< fahrenheit << endl;
//wait until user is ready before terminating program
// to allow the user to see the program results
cout << "Press Enter to continue..." << endl;
cin.ignore(10, '\n') ;
cin.get() ;
return 0 ;
}
When i click build and run my terminal opens and i get the following:
Last login: Tue Aug 26 17:33:44 on ttys000
Benjamins-MacBook-Pro:~ Ben$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ben/Google Drive/CPP Programs from Book/Conversion/bin/Debug/Conversion
sh: /Users/Ben/Google: No such file or directory
Process returned 127 (0x7F) execution time : 0.002 s
Press ENTER to continue.
I am very new to C++, I was hoping to get it to run a program so i can begin my adventures with it, just hoping somebody can help me out so i can get it running.
Thanks ahead of time