mac, pc and compiling

is there a way for me, using a mac to compile a c++ program to work on windows?
or could some one with a windows computer compile this code and send it to me somehow??

#include <iostream>
#include <string>
using namespace std;

int main () {


char* verb = new char[20];
cout << "skriv inn stammen av ordet som skal bøyes, og trykk enter. skriv + for ekstra funksjoner" <<endl;
cin >> verb;
cout << "Takk" <<endl;

if (!strcmp(verb, "+")){
char* ekstra = new char[1];
cout << "skriv 'u' for liste over innlagte ureglmessige verb." <<endl;
cout << "skriv 'k' for kontakt informasjon" <<endl;
cin >> ekstra;
if (!strcmp(ekstra, "u")){
cout << "creer, decir, ir, poder, poner, querer, saber, salir, tener, venir. " <<endl;
}
if (!strcmp(ekstra, "k")){
cout << "epost: jorgen95@gmail.com" <<endl;
cout << "mobil: 45859528" <<endl;
}
exit(0);
}

if (!strcmp(verb, "creer")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo creí - tú creíste - el, ella, usted creyó - nosotros creímos" <<endl;
cout << "vosotros creísteis - ellos, ustedes, ellas creyeron" <<endl;
exit(0);
}
if (!strcmp(verb, "decir")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo digo - tú dices - el, ella, usted dice - nosotros decimos" <<endl;
cout << "vosotros decís - ellos, ustedes, ellas dicen" <<endl;
exit(0);
}
if (!strcmp(verb, "ir")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo voy - tú vas - el, ella, usted va - nosotros vamos" <<endl;
cout << "vosotros vais - ellos, ustedes, ellas van" <<endl;
exit(0);
}
if (!strcmp(verb, "poder")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo puedo - tú puedes - el, ella, usted puede - nosotros podemos" <<endl;
cout << "vosotros podéis - ellos, ustedes, ellas pueden" <<endl;
exit(0);
}
if (!strcmp(verb, "poner")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo pongo - tú pones - el, ella, usted pone - nosotros ponemos" <<endl;
cout << "vosotros ponéis - ellos, ustedes, ellas ponen" <<endl;
exit(0);
}
if (!strcmp(verb, "querer")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo quiero - tú quieres - el, ella, usted quiere - nosotros queremos" <<endl;
cout << "vosotros queréis - ellos, ustedes, ellas quieren" <<endl;
exit(0);
}
if (!strcmp(verb, "saber")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo sé - tú sabes - el, ella, usted sabe - nosotros sabemos" <<endl;
cout << "vosotros sabéis - ellos, ustedes, ellas saben" <<endl;
exit(0);
}
if (!strcmp(verb, "salir")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo salgo - tú sales - el, ella, usted sale - nosotros salimos" <<endl;
cout << "vosotros salís - ellos, ustedes, ellas salen" <<endl;
exit(0);
}
if (!strcmp(verb, "tener")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo tengo - tú tienes - el, ella, usted tiene - nosotros tenemos" <<endl;
cout << "vosotros tenéis - ellos, ustedes, ellas tienen" <<endl;
exit(0);
}
if (!strcmp(verb, "venir")){
cout << "programet har oppdaget et uregelmessigt verb, og det bøyes slik:" <<endl;
cout << "yo vengo - tú vienes - el, ella, usted viene - nosotros venimos" <<endl;
cout << "vosotros venís - ellos, ustedes, ellas vienen" <<endl;
exit(0);
}
char* gruppe = new char[20];
cout << "er det et ir, er eller ar verb?" <<endl;
cin >> gruppe;
cout << "Takk" <<endl;

char* pronomen = new char[20];
cout << "hvem er det som, " << verb << gruppe << " (yo, tú, él, ella, usted, nosotros, vosotros, ellos, ellas, ustedes" <<endl;
cin >> pronomen;
cout << "thank you" <<endl;

cout << "." <<endl;
cout << "." <<endl;

if (!strcmp(gruppe,"ir")){
if (!strcmp(pronomen,"yo")){
cout << verb << "o" <<endl;
}
if (!strcmp(pronomen,"tú")){
cout << verb << "es" <<endl;
}
if (!strcmp(pronomen,"él")){
cout << verb << "e" <<endl;
}
if (!strcmp(pronomen,"ella")){
cout << verb << "e" <<endl;
}
if (!strcmp(pronomen,"usted")){
cout << verb << "e" <<endl;
}
if (!strcmp(pronomen,"nosotros")){
cout << verb << "imos" <<endl;
}
if (!strcmp(pronomen,"vosotros")){
cout << verb << "ís" <<endl;
}
if (!strcmp(pronomen,"ellos")){
cout << verb << "en" <<endl;
}
if (!strcmp(pronomen,"ustedes")){
cout << verb << "en" <<endl;
}
if (!strcmp(pronomen,"ellas")){
cout << verb << "en" <<endl;
}
}

if (!strcmp(gruppe,"ar")){
if (!strcmp(pronomen,"yo")){
cout << verb << "o" <<endl;
}
if (!strcmp(pronomen,"tú")){
cout << verb << "as" <<endl;
}
if (!strcmp(pronomen,"él")){
cout << verb << "a" <<endl;
}
if (!strcmp(pronomen,"ella")){
cout << verb << "a" <<endl;
}
if (!strcmp(pronomen,"usted")){
cout << verb << "a" <<endl;
}
if (!strcmp(pronomen,"nosotros")){
cout << verb << "amos" <<endl;
}
if (!strcmp(pronomen,"vosotros")){
cout << verb << "áis" <<endl;
}
if (!strcmp(pronomen,"ellos")){
cout << verb << "an" <<endl;
}
if (!strcmp(pronomen,"ustedes")){
cout << verb << "an" <<endl;
}
if (!strcmp(pronomen,"ellas")){
cout << verb << "an" <<endl;
}
}

if (!strcmp(gruppe,"er")){
if (!strcmp(pronomen,"yo")){
cout << verb << "o" <<endl;
}
if (!strcmp(pronomen,"tú")){
cout << verb << "es" <<endl;
}
if (!strcmp(pronomen,"él")){
cout << verb << "e" <<endl;
}
if (!strcmp(pronomen,"ella")){
cout << verb << "e" <<endl;
}
if (!strcmp(pronomen,"usted")){
cout << verb << "e" <<endl;
}
if (!strcmp(pronomen,"nosotros")){
cout << verb << "emos" <<endl;
}
if (!strcmp(pronomen,"vosotros")){
cout << verb << "éis" <<endl;
}
if (!strcmp(pronomen,"ellos")){
cout << verb << "en" <<endl;
}
if (!strcmp(pronomen,"ustedes")){
cout << verb << "en" <<endl;
}
if (!strcmp(pronomen,"ellas")){
cout << verb << "en" <<endl;
}
}
cout << "." <<endl;
cout << "." <<endl;
cout << "programet har få innlagte uregelmessige verb" <<endl;
cout << "Med forbehold mot feil." <<endl;
cout << "Av Jørgen Aunan." <<endl;
}
Yes, you can do this with MinGW.

This was compiled using MinGW on Linux:
http://94.23.22.190/etc/voc.exe

MinGW exists for the Mac too:
http://crossgcc.rts-software.org/doku.php
It works in the opposite direction as well if you know the proper cross-compilation options.

-Albatross
Topic archived. No new replies allowed.