Author |
Thread Statistics | Show CCP posts - 0 post(s) |

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.09 19:38:00 -
[1]
I've been teaching myself C++ and only have about 2 weeks of learning under my belt. I'm comfortable with strings, arrays, pointers (more or less), functions, what the various data types are, how to use relational operators, etc. Just starting to play around with classes and structs. But I'm very much aware that I have a hell of a lot to learn. Since I'm not taking a class, how do I tell when I am "competent" at C++? __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.09 19:38:00 -
[2]
I've been teaching myself C++ and only have about 2 weeks of learning under my belt. I'm comfortable with strings, arrays, pointers (more or less), functions, what the various data types are, how to use relational operators, etc. Just starting to play around with classes and structs. But I'm very much aware that I have a hell of a lot to learn. Since I'm not taking a class, how do I tell when I am "competent" at C++? __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.09 22:23:00 -
[3]
Originally by: Keta Min when you've finished some projects and your stuff works without shit suddenly exploding.
The most complicated thing I've managed so far is a prime number generator.  __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 09:37:00 -
[4]
Originally by: Sharupak
Originally by: ReaperOfSly
Originally by: Keta Min when you've finished some projects and your stuff works without shit suddenly exploding.
The most complicated thing I've managed so far is a prime number generator. 
LOL! I just did the regular number counter one time and I was curious to see how long the computer would take to count to a million.
It takes a long ****ing time LOL!
That's odd. It takes my program 3 and a half minutes to find all the primes between 1 and 100 million. Regular numbers (if I remember correctly are factors of a power of 60) should be much easier to find. They'll just be of the form 2^i * 3^j * 5^k. Just count up each of the i's j's and k's.
Okie dokie, I'll have a crack at this. __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 10:25:00 -
[5]
Almost done, I'm just stuck on trying to create a quicksort algorithm for my array of regular numbers. It keeps accusing me of trying to convert doubles into chars, which is blatently untrue. The word "char" doesn't even APPEAR in the code.  __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 10:51:00 -
[6]
I don't see the difference except the second one outputs twice. __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 11:36:00 -
[7]
Well I've been applying for jobs, and a fair few of them ask you to know C++ or be willing to self-learn it. So it's hardly pointless. __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 14:16:00 -
[8]
Originally by: Victor Valka
Originally by: Nyphur
Originally by: ReaperOfSly I don't see the difference except the second one outputs twice.
The first one counts to a million, then outputs the text "1000000". The second counts to a million and outputs the current number as text each cycle, then finally outputs "1000000" again. Printing text just requires a lot of processing overhead, that's all.
It is not so much the processing overhead as it is the output lag. The program can only continue processing once the OS has returned control to it after the device driver has returned to OS. Uh. At least I think that's the correct way to explain it.
Anyone care to correct me? 
My understanding was that quite a bit of the lag was created by converting between binary and decimal integers. The variable is stored in the computer as binary, it then needs to perform a calculation to convert it to decimal and display the result. __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Zetsubou Corp
|
Posted - 2008.10.21 16:07:00 -
[9]
Originally by: Ryysa Get your facts straight...
But wonky facts are more interesting.
|
|
|