I'd recommend programmingpraxis and project euler for some fun ways to practice problem solving and improving your coding speeds.
Project euler seems to be down at the moment though. Hopefully it...
Type: Posts; User: inequity
I'd recommend programmingpraxis and project euler for some fun ways to practice problem solving and improving your coding speeds.
Project euler seems to be down at the moment though. Hopefully it...
I'd recommend programmingpraxis and project euler for some fun ways to practice problem solving and improving your coding speeds.
Project euler seems to be down at the moment though. Hopefully it...
Post some real code!
So I fixed it up a bunch, but I can't seem to get around needing the constexpr constructors to access those values.
It complains that I can't use the values from a static array in a constant...
Hey, just wanted to say I fixed it! Thanks for the help Soma
For anybody who's interested: http://pastebin.com/6StzYjVw
Thank you. Seeing it laid out like that makes things much more clear.
The first example that comes to my mind is iterators in the STL.
To my knowledge, the containers in the STL implement their own versions of all iterators privately (probably as nested classes),...
So I was trying to write a compile time version of FizzBuzz, but I'm having a problem.
And I can't seem to figure it out.
It could be something really simple and stupid, but at this point I'm...
Anything is possible, including this, but this not trivial to implement in C++. You'd have to consider operating system and then learn a lot about it to make this happen.
For this specific...
In terms of i++ and i+=1, they are both pretty readable, and will generally be compiled into the same thing.
It's really your call, but because the increment operators are part of the language, I...
I tried to edit it a bit to see some things I would do, but I kind of forgot where I was at in there. Anyways, maybe I did something helpful? If you find anything in there interesting let me know and...
This looks helpful.
And so does this.
But if you're just learning how to program, I'd recommend starting smaller. Perhaps try writing a chess game where you play against yourself first.
If you need to draw pixel by pixel using only integers, I would suggest just rounding in whatever function you have actually setting those pixels. It will help keep your code clean and readable. The...
Have you run a profiler on it? Would probably be way more helpful than task manager at determining what could be optimized.
Let me google that for you
What's the error?
hahahahaha
Okay I understand what you're saying, but I have no idea why you'd want to avoid using structs. In a program of this scope, I just don't see a point in not using them.
In C, structs aren't very...
that is such gorgeous code. now go write it in LISP in one line. someday our whole computers will be one giant ternary operation!
ok, so if you want n to be the number of times the character is printed, try to structure your loop like this
for(int i = 0; i < n; i++)
Yeah, if you're able to pull out the raw pixel data, saving as a bitmap is actually really easy.
Can you post the code?
The introduction to the assignment made it sound really advanced, I was going to suggest markov chains and maps, but since you're only finding the frequency of individual characters in a text, here's...
I think we'd be more able to help if you commented this a bit better.
This is a really specific question, and is hardly based on C Programming at all, so without knowing the inner workings of this...
Microsoft Visual C++ Tips and Tricks
Check that out.
So this means that your array was allocated on the heap, but hasn't been initialized. Instead of just being full of completely garbage...
For any null terminated strings, which is what you're setting the string to match, you want to use double quotes. Single quotes are generally used for single characters.
This syntax would work
...