Friday, July 31, 2009

Ten points for c++ help?

So I have this program but I need to change it so that there is no std. I try to change it myself but then I alter the program too much and the code does not work anymore. I need someone to change so that there is no std, cout, cin, etc. Instead it has to be printf, getline, getinteger, etc. Please help, I reeeally need it.


#include %26lt;iostream%26gt;


#include %26lt;cstdlib%26gt;


#include %26lt;string%26gt;





int main(int argc, char* argv[])


{


std::string str;


std::cin%26gt;%26gt; str;


for ( int i = 0; i%26lt; str.length(); i++ )


{


if ( ((str[i]%26gt;='a')%26amp;%26amp;(str[i]%26lt;='z')) || ((str[i]%26gt;='A')%26amp;%26amp;(str[i]%26lt;='Z')) )


{


std::cout%26lt;%26lt;str[i];


}


}


std::cout%26lt;%26lt;std::endl;


return 0;


}

Ten points for c++ help?
You need some experts experience to your programming %26amp; project. So you can search from


http://expert.freshbloger.com/
Reply:Add the line


using std::string;


after your last include.








#include %26lt;iostream%26gt;


#include %26lt;cstdlib%26gt;


#include %26lt;string%26gt;


using std::string;





int main(int argc, char* argv[])


{


...

funeral flowers

No comments:

Post a Comment