So it doesn't add or change functionality? Kind of just a prettier way to make a comment saying its virtual?
also, holy crap you're a fast responder
Type: Posts; User: somekid413
So it doesn't add or change functionality? Kind of just a prettier way to make a comment saying its virtual?
also, holy crap you're a fast responder
So I was looking through some code for a project trying to debug it, and I ran into a gap in my understanding. The basic question is, what is the purpose of the "virtual" keyword before overridden...
yea I recognized that it wasn't a great way to implement the containers.
The fact of the matter is I recently started working for a big company, who's software you probably use, and probably have...
All the char *s, pointers, and everything is part of a much larger( a couple million lines) program that I am experimenting for. I pulled out the parts i wanted to mess around with, in this case the...
Thats odd. the Pu........() method came up above as pu..........., replace those.
So I was working on a destructor for a vector of object pointers and I wrote up a little test program to be able to get rid of any memory leaks. I have 2 methods. the first is to loop through the...
alright, I just redid it with your suggestion, which is exactly how I was doing it before, except using a for loop rather than while. worked great. So I went back and redid it with the for loop(post...
alright, that makes sense, but then why does it delete everything properly? I'll fight with this and post a solution if I come to it.
No, I understand that whiteflags. but in practice, in the example above, mymap->erase(it++); did not free the map properly at all, where as
for (it = whatever; it != end; it++)
...
Sorry to revisit. But I continued tinkering with this and now I'm a little more confused. I tried to delete the map post incrementing the iterator, as mentioned above. but I get this output:
...
Another question on this. this comes from the main program which I'm trying to understand. The for loop
for (it = ret.first; it != ret.second; ++it) {
wouldn't it always simply delete...
Simply because In the main program I'm trying to understand has the map as a pointer.
Alright makes sense,
now. If I understand, the first iteration of the loop deletes the iterator. now, at the end of the loop it adds one to an invalid iterator, which im assuming is now invalid...
Here is some code I half stole from the c++ referance website and filled in a little for my purposes. Initially I wanted to make sure I understood the equal_range function:
this is my...
All good advice. The issue is when I say large, I mean massive, so no rewriting the whole thing is possible. there are about 6 modules of which the smallest is about 400,000 lines of code. I have...
I found the magic stash of documentation, which is surprisingly good. But still its a tedious process. This product is a combination of about 5 different independent sub systems, each more complex...
About 4 months ago I graduated college with my BS in Computer Engineering. I just started my first real job as a Software Engineer. I have worked in the field on a few internships, but this job...
Ok... I think I got it. I think the number before the ' is the number of bits, and then b for binary, h for hex and then the value... the one that threw me off was the
assign GPIO_1 =...
Any recommendations for a good one? I figured this was a basic numerical notation, I think I've seen it on C and assembly before so figured it might transfer over.
I'm working on a verilog project(Not C I know, But I think this transfers over. Haven't found a good verilog board yet)
So i'm working through some demo code/ best practices to try to do a little...
So, I am porting a large C program into windows... and we are so very close to completion. Unfortunately this has to be done natively so things like SUA and Cygwin aren't an option.
we are using...
The interesting part is in Microsoft's subsystem for Unix applications (SUA) in their include headers they define those variables in a similar fashion to the Unix counterpart. since they are just...
I am working on porting a some software form Unix to windows. I create a couple files and want their permissions to be set to 777(or the windows equivilent) they are currently being set with the unix...
I actually did it with GCC in SUA but It isnt working. When I enabled the services for Unix windows component it runs but it just hangs there doing nothing.
the issue seems to be that its missing...
I compiled a project of mine and wanted to make sure it would run in a completely clean environment so I set up a virtual machine with just windows 7 ( same version that it compiles and runs on on my...