|
Are you looking for code to do "raw packet sniffing" ?
Once you are able to identify the game's packets, you can then try to reverse-engineer the content ( and this is hard).
Anyway,
I still feel that you are getting into something that is WAY over your current coding experience and expertise.
Good luck.
Nihil obstat
|
|
|
|
|
yes it is way way over my current coding experience which is zero in c++ ,and yes raw packet sniffing/editing is big part of what i wanna do,i just need guide lines how to achieve that ,im willing to put time and effort ,but i just don't know what should i learn beside basic stuff , i don't wanna consume time learning things that wouldn't help me about that matter
|
|
|
|
|
Give up. You haven't got a hope in hell.
|
|
|
|
|
Hi ziuss2!
It is true what our peers above says. You need to fully grasp the fundamentals. And sometimes programming can be tedious and drawn out. I would recommend you sign up for a class at your local school or maybe even take an evening class. Maybe a structured (classroom) environment will help you focus and keep on track.
Best of Luck!
With Kind Regards,
Live Support Software for Business
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:40am.
|
|
|
|
|
hi ...
i need to develop an windows application in c# to communicate in Lan in windows 7 environment . i need ideas to develop this.
thanks
|
|
|
|
|
Try the C# forum, and also explain in more detail what your problem is.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Post this question in C# question under quick Answer with an detailed explanation.
|
|
|
|
|
you can use any communication protocol UDP or TCP.
|
|
|
|
|
Hello,
I want to create a game that uses graphics (I will be coding in C++).
Though I am uncertain of which graphics library to use or the how to involve images.
My end goal is to be create a 3D game - but I suppose it is better to learn step by step. So I want to create a 2D graphic interface game and then build up from there.
Does anyone have any suggestions for which might be the best graphics library to use?
With Kind Regards,
Live Support Software for Business
April
Comm100 - Leading Live Chat Software Provider
|
|
|
|
|
|
Will do - thank you Mr. MacCutchan.
Live Support Software for Business
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:40am.
|
|
|
|
|
#include <iostream>
using namespace std;
template <class T> class Array {
public:
friend ostream& operator<< (ostream&, Array<T>&);
private:
T *pType;
};
template <class T>
ostream& operator<< (ostream& output, Array<T>& theArray)
{
output << "output array" << endl;
return output;
}
ostream& operator<< (ostream&, Array<int>&);
int main()
{
Array<int> theArray;
cout << theArray << endl;
return 0;
}
I tried compiling the following code and I get a warning on line 5 that this statement declares a non-template function but despite this warning the code does compile. However, it does not link. The error message from the linker is:
/tmp/ccIbnsNk.o:t2.C text+0x9b): undefined reference to `operator<<(std::basic_ostream<char, std::char_traits<char=""> >&, Array<int>&)'
I feel the above code defines the function the linker says is undefined. What am I missing?
Bob
|
|
|
|
|
This line:
ostream& operator<< (ostream&, Array<int>&);
declares a new function that takes an Array<int> as an argument, but you haven't provided a function body which leads to the linker error.
If you meant to explicitly instantiate the template for int, you need a bit more:
template ostream& operator<< (ostream&, Array<int>&);
|
|
|
|
|
Thanks for the response. However, I added the line you suggested and it did not solve the problem. I believe the line you suggested tells the compiler that we want to specialize the implementation for the special case of int. However, I am not sure of my facts on this one.
Bob
|
|
|
|
|
Sorry, I missed out that you have to fix the friend declaration too:
template<T>
friend ostream& operator<< (ostream&, Array<T>&);
An explicit specialization would look like this:
template<>
ostream& operator<< (ostream& output, Array<int>& theArray)
{
output << "output int array" << endl;
return output;
}
|
|
|
|
|
error message
.cpp(44): error C2678: binary '=' : no operator found which takes a left-hand operand of type 'const std::string' (or there is no acceptable conversion)
Header File :
#ifndef RESERVATION_H_ //to avoid redefinition errors
#define RESERVATION_H_
#include <iostream>
#include <string>
#include "Passenger.h"
using namespace std;
class Reservation{
private:
static int sn;
const string ID;
bool smokerSeat;
Passenger passenger;
public:
Reservation(string psngrName, long psngrPhone, string psngrPassport, bool smoke);
Reservation(Passenger& psngr, bool smoke);
Passenger getPassenger();
bool isSmoker();
string getReservationNumber();
void printDetails();
string ID_sn();
};
#endif /*RESERVATION_H_*/
source File
#include <string>
#include <iostream>
#include <sstream>
#include "reservation.h"
using namespace std;
Reservation::Reservation(string psngrName, long psngrPhone, string psngrPassport, bool smoke)
:ID(psngrName)
{
passenger.setPassengerName(psngrName);
passenger.setContactNumber(psngrPhone);
passenger.setPassportNumber(psngrPassport);
smokerSeat=smoke;
}
Reservation::Reservation(Passenger& psngr, bool smoke)
{
passenger.setPassengerName(psngr.getPassengerName());
passenger.setPassportNumber(psngr.getPassportNumber());
passenger.setContactNumber(psngr.getContactNumber());
smokerSeat=smoke;
}
Passenger Reservation::getPassenger()
{
return this->passenger;
}
bool Reservation::isSmoker()
{
return smokerSeat;
}
void Reservation::printDetails()
{
cout<< "passenger name: "<<passenger.getPassengerName();
cout<<"passenger Contact Number:"<<passenger.getContactNumber();
cout<<"Passenger Passport Number :"<<passenger.getPassportNumber();
cout<<"passenger ID:"<<Reservation::getReservationNumber();
cout<<" smoking preferences: "<<(isSmoker()?"smoker":"nonsmoker");
}
i got this problem in the reservation.cpp
i cant change any thing in the header file all what i can change is on the cpp file
can any one help to solve this problem
this is line 44:
ID=ss.substr(0,2)+s;
and in header file i have
string ID_sn();
function but im really confused how can i use it int the implementation file (source)
|
|
|
|
|
What line is line 44 ?
Nihil obstat
|
|
|
|
|
this one
ID=ss.substr(0,2)+s;
|
|
|
|
|
On line 44, you can not assign anything to the "const string ID". Are you sure the assingment isn't supposed to be ID_sn instead as it is public and not a const?
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
i change it to this
ID_sn()=ss.substr(0,2)+s;
and the previous error solved
BUT i got another error :
1>Reservation.obj : error LNK2019: unresolved external symbol "public: __thiscall Passenger::Passenger(void)" (??0Passenger@@QAE@XZ) referenced in function "public: __thiscall Reservation::Reservation(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,long,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,bool)" (??0Reservation@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@J0_N@Z)
|
|
|
|
|
You are missing a Passenger ctor in your cpp file that is used by one of your Reservation ctors.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
can you help me how can i add the passenger constructor in the cpp file
this is the passenger constructor :
#include <iostream>
#include "Passenger.h"
using namespace std;
Passenger::Passenger(string a="",string b="",long c=0)
{
setPassengerName(a);
setPassportNumber(b);
setContactNumber(c);
}
many thanks
|
|
|
|
|
Try this.
Passenger::Passenger()
{
}
This ctor for Passenger is used by the Reservation class.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
its WORK
but it seems i will have infinite No. of errors
when i got the last error i got another LNK2019 error with it, but i thought if i solve one of them the other will be solved also , and my thoughts was wrong
this is the other error :
1>Reservation.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > __thiscall Reservation::ID_sn(void)" (?ID_sn@Reservation@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > __thiscall Reservation::getReservationNumber(void)" (?getReservationNumber@Reservation@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
|
|
|
|
|
This time you get the error because you didn't define the funtion ID_sn().
I would just create a local std::string, assign to that one in line 44 and return it at the end.
|
|
|
|