41
Other Projects / Re: 200k Particle Simulator
« on: March 25, 2011, 10:35:35 pm »
Glad to hear that haha, I was afraid of people having around 1 FPS and yelling at me to fix it.
#include <iostream>
#include <fstream>
using namespace std;
void write_to_file( char* file_src, char* file_txt )
{
ofstream myFile;
myFile.open( file_src );
myFile << file_txt;
myFile.close();
}
int main()
{
char* input_src; char* input_txt;
cout << "Please Enter The File Name: ";
cin >> input_src;
cin.get();
system("CLS");
cout << "Enter Text to be Displayed in File: ";
cin >> input_txt;
cin.get();
system("CLS");
write_to_file( input_src, input_txt );
cout << input_txt; cout << " - Written to File";
cin.get();
return 0;
}
If your intresting in advertising on this site please contact the administration here
If you're interested in advertising on this site please contact the administration here
while (!done)
{
try
{
System.out.print("Enter a float please: ");
if (!in.hasNextDouble())
throw new BadDataException("Input needs to be a floating point number! Try again.");
else
data.add(in.nextDouble());
}
catch(BadDataException exc)
{
System.out.println("Bad data: " + exc.getMessage());
System.out.print("Enter a float please: ");
if (!in.hasNextDouble())
{
System.out.println("Bad data: Input needs to be a floating point number! Chances are up!.");
done = true;
}
else
{
data.add(in.nextDouble());
}
}
}
RewriteRule ^replays/view/(.*)/(.*)$ forum/index.php?action=replays&sa=view&rid=$1&cp=$2 [NC,L]