This is the only video I know of relating to C++.
That said, as jmd15, read and work through tutorials. There are plenty of books out there that'll help you learn C++ (keep in mind, not all...
Type: Posts; User: Zach L.
This is the only video I know of relating to C++.
That said, as jmd15, read and work through tutorials. There are plenty of books out there that'll help you learn C++ (keep in mind, not all...
It appears to have been taken down. It was quite amusing earlier.
Same deal. If you were writing to a file or something, there may be issues with your file.
Cheers
Well, if it happens to be accessing a resource that is not completely internal (file, network connection, etc), then there could be corruption of that data, but you can't corrupt your application is...
Fair enough.
I was thinking along the lines of your program bogging down the system resources. Assuming that you can't recycle anything, at that point, there isn't much that can be done.
Chhers
You will have to be more specific, and provide some code. Syntactically, you'd use a global in a class member function the same way you would anywhere else.
Of course, it is a really bad idea to...
Checking for NULL isn't worthshile unless you have an old compiler (as stated above). In my opinion, there generally isn't too much point in trying to catch the exception. If you're out of memory,...
You can achieve the "continual testing" by means of encapsulation. If you have a class (perhaps only a wrapper class) with an overloaded operator=, for instance, then you can 'continually check'. I...
Dae, I don't know what you mean by constant check, but throwing an exception will unwind the stack until the exception is caught or, if it isn't, the program is terminated.
Deltahawk12, your...
Well, to eliminate the templates, you can simply remove 'template<typename T>' and replace 'T' with whatever type you are using (in my example, unsigned char).
The theory in mine, is this:
Say...
There are easier ways to do this. Simply shoft in the desired direction, and then 'or' the remainder back onto the front (no testing required):
#include <cstddef>
#include <iostream>
#include...
This went downhill fast.
I've dealt with some very competent people, and seen many incompetent ones. I'll readily concede the point.
You make a good argument, and I don't completely disagree with it, I just think it is...
There is another factor that I have not seen anyone mention that is (and should be) a part of deciding on the language. Sure, language A may be the theoretically optimal language for the problem, but...
You're thoughts seem to me to be a bit too narrow. Certainly, GUI programming in C++ is challenging and time-consuming. It is doable in C++, but in many cases (not all), there are much better tools...
Your solution is simple, clear, and effective; stick with it.
Additionally, there is really no other way that is fundamentally different.
Cheers
A friend of mine failed the eye exam and was still given his driver's license.
:rolleyes:
It really isn't all that hard over here.
A side note on grumpy's:
Consider:
struct foo {
typedef my_traits<foo>::char_t* ptr_t;
};
It is clear that you want the type my_traits<foo>::char_t* to be typedef'd as ptr_t, but the...
My personal preference for such a task would be to use a std::map from the key type (integers) to a "task" object pointer, where the task object is an abstract base for your functionality. This...
You are changing the data pointed to by the pointer; that is why the change is permanent. It would be different if you wanted to change what the pointer points to.
#include <iostream>
void...
#include <iostream>
int main()
{
int p;
std::cout << std::hex << reinterpret_cast<unsigned long>(&p) << std::endl;
}
Of course, int* and unsigned long are not guaranteed to have the...
Well, since negative values are illegal, it does make sense to use an unsigned argument despite the fact that a large unsigned argument could overflow (which, there are ways to detect and report an...
The power of Wikipedia.
... But it doesn't run on Mac...
Download Xcode from Apple's website.
Personally, I usually prefer the jEdit editor as well, but Xcode has it's own fine editor.
*edit* And standard C++ tutorials are independent of platform....