15,867,704 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by WaZoX (Top 39 by date)
WaZoX
22-May-17 7:33am
View
That did the trick.
Yes it's a template type so you are probably right. It makes sense to allow some additional memory consumption to avoid side effects!
Thanks a lot for your help!
WaZoX
17-May-17 7:59am
View
I will have to investigate that further. Thanks!
WaZoX
17-May-17 7:57am
View
Thanks for your suggestion.
I changed the union to this:
union TargetData
{
TargetData() { location = FVector(); }
TargetData(const FVector &inLocation) { location = inLocation; }
TargetData(AActor *inActor) { targetActor = inActor; }
FVector location;
TWeakObjectPtr<aactor> targetActor;
} targetData;
Now I get the complains at the union instead. E.g. for the empty constructor I get the following errors:
error C4582: 'Target::TargetData::location': constructor is not implicitly called
error C4582: 'Target::TargetData::targetActor': constructor is not implicitly called
...
WaZoX
17-May-17 7:26am
View
Thanks for your reply! A name for the union isn't needed in the link you posted, see the "Unrestricted Unions" example. I looked at it before but can't understand why I can't get my code to work. For me that example looks pretty much the same as mine?
WaZoX
1-Jul-13 20:03pm
View
(8 * size + 7) / 8 = 1 * size + 7/8
Assuming it's integer arithmetic, 7/8 = 0 therefore,
1 * size + 7/8 = size + 0 = size
(8 * size + 7) / 8 = size ?
WaZoX
1-Jul-13 19:34pm
View
Why can't it just overwrite the pointer to the virtual function table depending on which class that is "used/active"? Anyway I see that I didn't mentioned virtual members so I will accept this solution as well =)
WaZoX
1-Jul-13 19:23pm
View
Thank you very much for your answer, it has been very helpful!
WaZoX
1-Jul-13 15:38pm
View
I really like the idea of allocating a few different pools and I guess that you actually could allocate them first when you have an object that doesn't fit one pool already existing. Really nice idea.
WaZoX
1-Jul-13 15:33pm
View
That's sounds like an acceptable solution but it needs a new template case for almost all new classes or I'm I wrong?
WaZoX
1-Jul-13 15:26pm
View
I thought of this myself actually but almost all the classes are using virtual functions. For some reason that's not possible to compile with visual studio so this isn't an option for me unfortunately. Apart from that it's a very clean and nice solution.
I get the following error for a basic class (called MyClassB) with one virtual member:
"IntelliSense: invalid union member -- class "MyClassB" has a disallowed member function"
WaZoX
22-Jun-13 11:59am
View
I found "Microsoft Visual C++ Compiler Nov 2012 CTP" which will enable it in visual studio. I updated the answer with it also. Thanks for your help.
WaZoX
22-Jun-13 10:51am
View
I tried using typename instead but it was still the same problem, just that the first error was now "error C2143: syntax error : missing ',' before '...'" instead. From what I understand from the documentation it should have the same meaning though.
WaZoX
17-Jun-13 17:46pm
View
That explains a lot =) Thank you very much! 5.
WaZoX
17-Jun-13 15:44pm
View
My question is about the build-in references in C++. I understand std::ref() I think. =)
WaZoX
17-Apr-13 14:49pm
View
I can't see that's the case.
My sources are,
http://www.roguewave.com/portals/0/products/threadspotter/docs/2010.4/manual/ch_intro_coherence.html
http://en.wikipedia.org/wiki/MESI_protocol
http://stackoverflow.com/questions/558848/can-i-force-cache-coherency-on-a-multicore-x86-cpu
maybe not very reliable sources but they all speak for that this is solved and not an issue for multicore programs.
Plus one book called "Computer organization and design" don't sure about what revision right now but can check if it matter.
I'm not saying you must be wrong but it seems anywhere else where I can see, that what I said is the case and that's for multicore programs as well.
Could you give me some references to verify that what you're saying is correct?
EDIT: I'm taking about Intel's x86 and x64. In general you can't assume this behavior.
WaZoX
28-Mar-13 21:03pm
View
Also found this http://www.codeproject.com/Articles/4795/C-Standard-Allocator-An-Introduction-and-Implement great article for those who also are interested.
WaZoX
28-Mar-13 21:00pm
View
Thank you very much! Made things a bit clearer.
WaZoX
28-Mar-13 20:56pm
View
Yes, I'm aware of that. My question is not about why it behaves like it does since I understand the implementation. The question is why someone would implement such a list since the only advantage over an array is that you can add and remove in the front of the list in constant time instead of linear time. In e.g. C# you can create nodes and add them to the list, then you can remove them in O(1) as long as you still got the reference without searching the list whole list in worse case scenario.
However I consider the problem solved and will accept your solution since I think it's really good if you aren't aware of the internal implementation. Thanks for your answers!
WaZoX
28-Mar-13 20:36pm
View
Code is normally the worst way to explain a problem. Try to be more specific, there are a lot of people here who probably can help you out then.
WaZoX
28-Mar-13 20:14pm
View
The question is a little bit diffuse and maybe more of a discussion. The thing is that I find it weird that you can't access the internal nodes and wounder why one would need such an implementation. At least from my experience most times a linked list is motivated to use, one would like to have access to the internal nodes and being able to remove nodes in O(1) by reference or pointer to the node itself.
Say e.g. I have a lot of object I want to add to the list. Then I remove some objects near the end, it's then likely to take N*[number of elements removed] which is completely unnecessary because it's a doubly-linked list. One is at least theoretically able to do this in O(1) as you said before.
I hope you see my point, maybe the question wasn't very clear from the beginning. I guess I will have to implement one myself.
WaZoX
28-Mar-13 18:17pm
View
"According to this specification, this should be a doubly-linked list. In this case, the removal time complexity should be of O(1)."
Yes! That's exactly what I mean but in the implementation it's linear in container size. My question is if there is any particular reason for being so. I'm interested in this because I'm coming from C# and there you already have this features in the standard library and I can't really see the use of a linked list where you can't access the internal nodes.
(reference http://www.cplusplus.com/reference/list/list/remove/)
WaZoX
11-Feb-13 13:42pm
View
I would guess it's standard Windows.Forms but I agree that it's really unclear.
WaZoX
11-Feb-13 13:23pm
View
I would go for Netbeans or Eclipse most of the time. Depends of course a little bit on what you are doing. The question could probably have given you more specific answers if it was more precise.
WaZoX
11-Feb-13 13:15pm
View
Seems like most people are positive about using ASIO and happy with their experiences using it, so I will probably go for it as well. Thanks a lot for sharing your experience.
WaZoX
9-Feb-13 11:36am
View
I believe you but just wants some more input from the forum before I decide how to continue.
WaZoX
9-Feb-13 11:33am
View
"Boost.Asio is a cross-platform C++ library for network and low-level I/O programming", first hit on google. http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio.html
My question is partly about ASIO.
WaZoX
8-Feb-13 11:20am
View
I hardly doubt it would "generally negates help from the majority". Guess you are talking for a very small group. I also believe this is really off topic so please respect other peoples thoughts and questions even if their English isn't perfect.
WaZoX
8-Feb-13 9:54am
View
Sounds great if there isn't no such limitation or if the underlying implementation takes care of that. Maybe stupid question but would you consider ASIO to be reliable enough to e.g. base the network code on it in a commercial product? I guess I gonna write a simple test application and try if it works but it sounds very promising. Thanks a lot for your answer and for sharing your experience.
WaZoX
7-Feb-13 15:30pm
View
I'm not completely sure what you mean with "animating the movie". If you want to look into media composing and editing the way to go is probably Adobe Premier and maybe After Effects as well. If you are looking for a 3D animation software I would recommend 3ds max.
WaZoX
7-Feb-13 14:57pm
View
I'm not sure you understood my question correctly? The TCP protocol itself does contain an integer in order to count the number of bits sent, from what I understand that limits the underlying TCP stream itself from sending more data than 4GB. So I wonder if the implementation of ASIO has solved this issue behind the scenes or if you should keep track of it yourself.
The data isn't stored in memory for very long, so not being able to address it in memory isn't a problem. The data is also "generated" in small chunks so that's neither a problem for the sender. I should have been more clear about that, thanks for pointing that out and for your answer.
WaZoX
17-Dec-12 13:51pm
View
Thank you very much for your input, sounds great that it doesn't seems to be such a big problem with fragmentation. Means more time for the game! Do you believe memory fragmentation would be a problem for bigger titles like AAA games? I'm aware of the delete keyword but thank you anyway :)
WaZoX
23-Nov-10 9:13am
View
Thanks a lot, you have many good points that I will fix. It's sounds very logical now when I read it. What I didn't understood was why the "LinkedList" would give extra poor performance, should an "ArrayList" work better even if it still would be
very slow?
WaZoX
23-Sep-10 13:15pm
View
Thanks a lot, this made things more clear =)
WaZoX
23-Sep-10 13:11pm
View
Thank you very much, I think I understand now.
WaZoX
23-Sep-10 13:09pm
View
Reason for my vote of 5
Automatic vote of 5 for accepting answer.
WaZoX
23-Sep-10 13:09pm
View
Reason for my vote of 5
Automatic vote of 5 for accepting answer.
WaZoX
3-Sep-10 12:28pm
View
Think I got a better picture of it now. I going from Java programing to c++ so some questions come up =), thank you very much.
WaZoX
2-Sep-10 16:00pm
View
I figured out a similar version but this is what I really were after,
thank you very much!
WaZoX
1-Sep-10 17:57pm
View
Thanks for your answer, that can possibly work.
Show More