What is wrong here?

#include <iostream>

using namespace std;

int main()
{
char url;

cout<<"Please enter a url: ";
cin>> url;
cin.ignore();
cout<<"<iframe src="<< url <<"width="610px" height="500px"></iframe>\n";
cin.get();
}

The program should retrieve a url specified from the user, and place it in var url then print on the screen the beginning of an iframe code, the url, and then the rest of the iframe code. It wont compile, it says invalid suffix "px"
i figured out that it was trying to close the text after width= and then thought that 610px was a command or something. i replaced them with ' and it compiled. but, it wont run. command prompt or anything wont run. i hit compile and run, nothing, i went to the file and double clicked on the application and nothing. is there something else i need to do?
I forgot to mention: i am using windows 7 and have no choice of any other os, and it appears that dev c++ is not compatible, because even this:
#include <iostream>

using namespace std;

int main()
{
int thisisanumber;

cout<<"Please enter a number: ";
cin>> thisisanumber;
cin.ignore();
cout<<"You entered: "<< thisisanumber <<"\n";
cin.get();
}



example from cproggramming.com tutorial thing wont open. it compiles, but wont open. any idea on how to make it an install program, and not a command prompt thing?
isn't windows 7 still in pre-release beta testing stage??
How come you are using it as your main OS??
it is beta... I had a virus, and when i made a recover disc for factory default, it screwed up and burnt a near hole in my disc... i didnt see it until everything had been wiped, but was only 27% into installing vista again. I didn't want to do it illegal, so i went with windows 7. before 7, i had linux for a while, and attempted to convert my .exe recovery manager to something linux can use, and forgot to save as, and ended up corrupting it. i am only 14, so cant call, and my stepdad and mom wont call gateway to get a recovery cd. I made something in excel that works well enough, so i dont need help with c++ anymore.
btw, that was vista home premium too, really sucks to lose.
Last edited on
Topic archived. No new replies allowed.