I could use a pointer, but what I really don't understand is when a person I met on IRC tried to compile some example code in VC++ 7.1, and it didn't report any errors. I use VC++ 7.0. Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
Rickard Andersson20
Posts
-
Problmes using std::map in a class -
Problmes using std::map in a classServer.h
class TcpServer
{
...
private:
static map<SOCKET, TcpServer> m_instances;
...
};When I build this, the compiler reports this:
error C2079: 'std::pair<_Ty1,_Ty2>::second' uses undefined class 'TcpServer' with [ _Ty1=const SOCKET, _Ty2=TcpServer ]
Any solution? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318 -
Can Tcp/Ip "Accept() " Be Made "Non Blocking"I think you should go by
select()
then. It takes a parameter which specifies a timeout for the operation. You can also check out theWSAAccept()
function. Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318 -
Network I/O modelsI've been trying to read about the best network I/O model and talked to people about which network I/O model is the best. Different answers from different peopels about the same model. Asynchronous I/O: One says it's the best model for concurrent operations, an other says it's bad because of a lot of synchronizing/locking when access shared data (such as client list on a server), then a third says, locking is not bad...man, this is kinda confusing. Synchronous I/O - using select(): I would say this one is bad, because then you have to wait for each operation to copmplete before you can move on. Other people says this is a great network I/O model. What is your opinion about the best network I/O model? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
UML - Associations and aggregationWhen an object relates to another object using an asociation (or aggregation), does it mean it ALWAYS has a member varible of that "other" class? Like this:
----------- ----------------
| MyClass |----------| MyOtherClass |
class MyClass
{
private:
MyOtherClass moc; // Association
}Or, could it also mean that MyClass for example access static member varibles/functions in MyOtherClass? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
16,384+ local varibles!!! WTF!?I perhaps would say that it's not a colleague to me :) Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
16,384+ local varibles!!! WTF!?[quote] At my previous job, we were porting a UNIX system to Windows NT using Microsoft VC++. A colleague of mine, that was in the process of porting his portion of the code, came to me, looking really upset. * Colleague: "Hey! I hate these Microsoft guys! What a rotten compiler! It only accepts 16,384 local variables in a function!" [/quote] :wtf::wtf: Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
MQOTDGoogle told me it's from Dogma :) Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
Visual trick:falling off my chair: Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
REPOST?My nickname, duden: Digital Unit Designed for Exploration and Nullification What is Nullification? :~ Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
UML - Okay design gurus, can you help me?If an method would instantiate a local object that will do an asynchronous operation, how would that look in UML? A code snippet of what I want in UML is:
// C#
class MyClass
{
public DoOperation()
{
MyAsyncObject obj = new MyAsyncObj();
obj.StartSomethingAsynchronously();
}
}If
obj
was a member varible the diagram would look something like this:----------- 0..* -----------------
| MyCLass |<>--------->| MyAsyncObject |
Hope I'm clear enough... :~ Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
COTDand why is the file extension TXT? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
CALLBACKMr.Prakash wrote: lauren said its a static function, which is wrong In C++ it's not. Mr.Prakash wrote: lauren said what is callback function, that is correct. What do you mean? Your English is almost impossible to understand sometimes. Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
CALLBACKMr.Prakash wrote: VC++ compiles code writen in C++ so If you write something in C++ that VC++ cannot compile then its not a VC++ code. what ever that meant. You can write C code. And
LRESULT CALLBACK Name(...)
is a callback declaration of a C function callback, not C++. lauren said it's a static function, and because this is a (V)C++ forum C++ is the first hand language so a callback function is a static function (member function actually). Mr.Prakash wrote: and in VC++ CALLBACK is different not callback but CALLBACK (something the original poster has asked the question about). I hope now its clear. if so, lauren explained what a callback was? not the defination ofCALLBACK
... Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318 -
CALLBACKMr.Prakash wrote: Is VC++ not C++ ?? :sigh: VC++ is a compiler. C++ is a language. In C++ (the language) you must declare a method as
static
before you can use as a callback. Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318 -
CALLBACKThink twice, what about in C++? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
Search?jhaga wrote: Are people taking this Lounge a little bit too serious? Yes. Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
ADMIN: Update on What's Going OnWhat happened with the ASP.NET version of CodeProject, Chris? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
ASP.NET Resource Kit available for DLPiece of a cake :cool: Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
Language Translation Challenge (mainly for Swedes)From NE.se slamkrypare subst. zool. mudskipper, vard. (fråga som innehåller ett fel) wrongly posed question Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318