Programming |
![]() ![]() « Citoyen » 1360092000000
| 0 | ||
Fxie a dit : AHAH, i wrote my own code, and i like to post it. U aren't the boss of me what sould i do with the code. Fxie is thinking that she is the master coder and that no one is better than her |
0 | ||
Can you elaborate as to what it even is? I couldn't understand past the merge of minimally descriptive text and code. I also noticed you tried to use 1 2 3 4 5 tags despite being "to lazy" to use [quote[url][/url]] tags... honestly not whether to believe you just copied the whole post and edited some names or not. |
![]() ![]() « Citoyen » 1360092240000
| 0 | ||
Fxie a dit : |
![]() ![]() « Citoyen » 1360094160000
| 0 | ||
[edited for not wanting a mute reasons] |
![]() ![]() « Citoyen » 1360111200000
| 0 | ||
Todorovski a dit : Well,Depends what you consider it. Ediz a dit : Awe :< |
0 | ||
Tummnus a dit : Markup language. By definition. All languages aren't programming languages |
0 | ||
Ediz a dit : Please don't use python except for short scripts. |
![]() ![]() « Censeur » 1360143060000
| 0 | ||
Noob question time; What /float/ is in C++? I missed one lesson from extras due a contest and now when I took somebody's notebook I see this thing. |
![]() ![]() « Citoyen » 1360144080000
| 0 | ||
Methusalah a dit : Float is some kind of command, which allows you to use decimals. For example: #include <iostream> using namespace std; int main() { int a; float b; a = 15; b = 14.05; }; |
0 | ||
I don't speak Cx but I know by my understanding of floats in assembly that floating-point values are essentially decimal values rather than integers (whole numbers). int (integer): 1, 2, 3 float (floating-point): 1.1, 2.2, 3.3 floats are bigger in size since computers have to compensate for not being very good at decimals with huge numbers 0x3F800000 is 1 with floats whereas 0x01, 0x0001, or 0x00000001 can be 1 with integers depending on the size you need. also tfw never took a coding class |
![]() ![]() « Citoyen » 1360153320000
| 0 | ||
Fxie a dit : You've learned everything yourself? :o ------------------------------------------------------------------------------------------- By the way, there are other codes for decimals, such as double and long long I guess. Float takes only 4 bytes, and double or long long take 8 bytes. I recommend you double instead of float because it allows you to add more than 15 decimals (20 I guess), and it is more precious. About int (Integer), if you use a decimal, it will circle it on the first number. Such as: 3.59 - 3, 7.12 - 7 etc. EDIT: Anyone knows why is .h in this: #include <iostream.h>? |
0 | ||
Todorovski a dit : yes quite hmm yes quite yes hm But you just explained that as though double and float values are two different things. They are not. |
![]() ![]() « Citoyen » 1360154460000
| 0 | ||
Fxie a dit : I never said they are different. Did you actually read what I said eh? |
0 | ||
Todorovski a dit : a dit : a dit : ye I'm not talking about Cx here, I'm talking about floats. If they're defined differently in your language, I wouldn't know as I don't speak it. I just know that these are all floats and you can't use one kind of float as opposed to floats in general. That's how I'm seeing it based on your explanations. |
![]() ![]() « Citoyen » 1360155480000
| 0 | ||
I am working on a calculator. I need some help to give it a better look. Here are the scripts: ![]() |
0 | ||
Methusalah a dit : http://floating-point-gui.de/ It is important that you understand the quirks associated with floating point numbers. |
![]() ![]() « Citoyen » 1360175220000
| 0 | ||
Someone explain me the return parameter in c++..I still struggle with it. I don't think I ever got it correctly as I rarely followed the lessons for c++ programming. |
0 | ||
If you're referring to the "return x" at the end of most functions, that returns a value to the caller. For example, and this is in JS but I imagine it wouldn't be much different in C++, function test() {return 2} then if you, say, set a variable to the function two=test() test would be executed and return 2, which would be the value assigned to "two" If you have nothing to return, I don't imagine you'd bother putting return (unless it's necessary in C++?). |
![]() ![]() « Citoyen » 1360176840000
| 0 | ||
Fxie a dit : You aren't supposed to use return always, but only when you use int main(). (For example, when using void main(), you shouldn't use it). I don't know why, but that's what I know. |
0 | ||
Todorovski a dit : void main isn't standards compliant (unless you are running in a hostless system). main is expected to return an int. |