TranceAddict Forums (www.tranceaddict.com/forums)
- Chill Out Room
-- A program I wrote
Pages (2): « 1 [2]
| quote: |
| Originally posted by Nou I havnt even looked at C# or .NET that much... I really want to get back into Visual Studio and start learning that stuff again, but work keeps me tied down in PHP and Javascripting and boring logic controls, nothing exciting! |
.. | quote: |
| Originally posted by 3xx3r7 Java eats C++ for breakfast. |
)| quote: |
| Originally posted by Trancedewd LOL it doesnt work on other computers? Oh well, i must really suck at programming |
| quote: |
| Originally posted by itsTrueSonic that's the thing i hate with c++ .. in order to copy the .exe, you also sometimes need to copy the object files that is created with the executable .. |
C# is pretty much like Java, but has a few things here and there that makes it a bit better than Java.
In C#, when you have to use pointers, you have to label it as unsafe code.
For some reason that cracks me up.
version 2.0!
| quote: |
| #include using namespace std; int main() { float a, b, c; int x; while ( x != 1) { cout << "This is Fahrenheit to Celsius convertor v2.0.\n"; cout << "Please enter the amount of degrees you would like to convert.\n"; cin >> a; b = a - 32; c = b * .5555555555; cout << "The degrees is " << c << " celsius.\n"; cout << "Would you like to exit the program? Enter 1 if yes, anything else to continue."; cin >> x; } return 0; } |
Try "char anything".
Then put "while(anything != y)" instead of the x.
Then cin anything.
I tried that, but it didn't work. compiler gave an error or something
When I said "anything" I meant a letter like "a".
right
ok so i have....
#include
using namespace std;
int main()
{
float a, b, c;
char *x;
while (strcmp(x,"y")) {
cout << "This is Fahrenheit to Celsius convertor v2.0.\n";
cout << "Please enter the amount of degrees you would like to convert.\n";
cin >> a;
b = a - 32;
c = b * .5555555555;
cout << "The degrees is " << c << " celsius.\n";
cout << "Would you like to exit the program? Enter y if yes, anything else to continue.";
cin >> x;
}
return 0;
}
but when i try and run the program, an error box opens and nothing happens
So I wasn't that far off the road.
it compiles just fine, but it doesn't run.
Just remembered, I forgot to look for the floppies.
If it's a string that you're using, don't you need an additional header?
Nope, since its a char. Like i said, it compiled fine. I would think it wouldn't compile correctly if i was missing a #include thingy
side question: My programs are like 500KB big for 20 lines of code............wtf?
| quote: |
| Originally posted by Sunsnail while (strcmp(x,"y")) { |
Im bumping a thread from last year! 
Powered by: vBulletin
Copyright © 2000-2021, Jelsoft Enterprises Ltd.