21 Discussion / Question Topics
Remove Filter i've recently engaged in an argument with my dad about CDs and DVDs vs memory sticks and i basically stated that since nowadays it is common for almost everyone to have at least a 16GB stick, CDs and DVDs are basically becoming useless/non-convenient. he countered me stating that CDs have … | |
i want to construct a Message class which encapsulates and handles data for sending over a network; i want to acheive something like this: Client->Send(new CMsgPacket("Some Message", CHAT_COLOR_WHITE, CHAT_TYPE_SERVICE)); // send function deletes the data after processing it // this is the CMsgPacket class class CMsgPacket { private: int Msg_Len, … | |
the basic idea is that i have a config file where i need to take entries in different formats(the key is always a string and the value could be any type: int, float, string etc) from and the file has the following style: firstentry 1.5 secondentry 35 thirdentry somestring and … | |
first of all, sorry if this thread is in the wrong section, but i think this is the most appropiate one i need clear instructions for installing AND configuring QT for my machine(i am running windows 7 on 64bit) i don't want other reference links unless they perfectly suit my … | |
i'm learning about networking on a site and there says there are 3 types of sending data: unicast, multicast and broadcast in the unicast case the IP layer encapsulates the IP destination(let's say "derp"). the interesting fact i've read about the unicast is that all machines within the same network … | |
t to do something like [code] void f1(int a[][]) {//do smth } //and call the function like this F1({{1,0},{2,5}});[/code] | |
i've downloaded the last version of boost(1_47_0) but i don't know how to build it, i tried to find a tutorial on google but that didn't help much because it was for a very old version and some thing changed. anyway, my compiler does have minimal support for C++0x, will … | |
i've seen many programs using printf( ) for outputing(probable ported from C) but anyway, is there any difference between printf and cout? also i've seen many functions(expecially in windows.h) using w_char*(wide char string) as arguments or return value(and it bugs me because it makes difficult to use with strings) what's … | |
i have this question in mind since i first found out that you can declare and array like this [CODE] <type>* nArray [/CODE] how does the compiler how much storage to allocate? i've heard that it doesn't allocate any storage, it just points to some address and when you use … | |
i really need a GOOD socket tutorial, i've followed some of them from google but they aren't complete, i know that socket programming is forked into many categories, basically i am interested blocking & non blocking sockets, synchronous & asynchronous sockets(used with select() and FD_ISSET macro etc) PS: i know … | |
when you want to decript a program's protocol how do you do it? you use an packet listener(eg. WireShark) and try to figure out what each packet means? is this the only solution? cuz it seems to me like a lot of hard work, is there anything to make this … | |
i am planning to start learning how to use threads. my question is: should i first learn windows.h's functions for threading before boost to get the pattern or should i jump right to the boost threads? ps: sry if i posted in the wrong section | |
there are 2 common ways to loop through a vector 1: [CODE] vector<int> myvec; // let's assume it's initialized for(int i = 0; i != myvec.size( ); i++) { // code // access by 'myvec[i]' } [/CODE] 2: [CODE] vector<int> myvec; // let's assume it's initialized for(vector<int> :: iterator i … | |
basically i have a header full of function prototypes(util.h) and a cpp file with the functions body [CODE] // util.h #include <ctime> uint32_t GetTime( ); uint32_t GetTicks( ); // util.cpp #include <util.h> uint32_t GetTime( ) { return GetTicks( ) / 1000; } uint32_t GetTicks( ) { return clock( ); } … | |
i've never knew how to use command line arguments since the first source code i used to edit(and from i learned basics of c++) was using a config file to 'read' user input data on program startup and not command line arguments. now my question, what's the difference between using … | |
hi, i am new to this forum so i made this post for presenting myself oh, and for those who would say that i registered about 3 years ago, i must say that when i registere, i didn't intend to be active on forum, i registered only to put one … | |
what's the difference between: [CODE] // main.h #ifndef X_H #define X_H #include "point.h" // supposing that point.h contains the declaration of Point class class MyClass { private: Point m_Point; //... }; #endif // main.cpp #include "main.h" //... [/CODE] and [CODE] // main.h #ifndef X_H #define X_H class Point; class MyClass … | |
i've seen in some sources that some classes have Getters and Setters even for public data members [CODE] class Example { private: int m_ID; public: string m_Name; int m_Age; Example( ); ~Example( ); void SetName( string nName ) { m_Name = nName; } void SetId( int nID ) { m_ID … | |
recently i understood at last how can i store more values in an int with bytwise operators, also, i have read that #define directives are evil for a number of reasons. one of them: [CODE] #define SEVEN 2 + 5 int result = SEVEN * 5; cout << result; // … | |
i know you cannot understand anything from the title and i am sorry but i don't know how to say it because it's a little complicated, so i won't give details of my problem, i hope you can understand from the code classB.h: [CODE] #ifndef CLASSB_H #define CLASSB_H class MainClass; … | |
i have GHostOne advanced remote host bot last version but i have some problems edditting it. when i try to compile game.cpp (edited by me) gives me a lot of errors that i cannot solv (compile.txt file) anyway...i cannot even compile the originat cpp file cuz he gives me a … |