Currently we're parsing arp request output from the command line.
string cmd = "arp -n ";
cmd.append(ipaddress);
cmd.append(" | grep ");
cmd.append(ipaddress);
fgets( line, 130, fp);
fgets( line, 130, fp);
ret.append(line);
...
It works, but is there a way to do this using a library function that wont depend so much on the native com...
I am working on an application for Windows Mobile 6 (or maybe 5) that plays YouTube videos. Well, it should play YouTube videos (and control/query the player about status changes, current frame/time, etc.)
After scouring the web for quite some time now (and a few trials), I still couldn't find a way to do this. The options I know of are...
What is the best way to do system wide user mode (NOT KERNEL MODE) api hook on Windows NT?
...
Duplicate:
c++ smtp example
any suggestion libraries?
...
To what extent are modern C++ features like:
polymorphism,
STL,
exception safety/handling,
templates with policy-based class design,
smart pointers
new/delete, placement new/delete
used in game studios? I would be interested to know the names of libraries and the C++ features they use. For example, Orge3D uses all modern C++ feat...
I am developing a E-mail archive project using stubbing concept, In that I need to create a stub on the exchange server, if you have sample code, please share it.
...
Hi
can any body tell me how to conver const char* to char*?
get_error_from_header(void *ptr, size_t size, size_t nmemb, void *data) {
ErrorMsg *error = (ErrorMsg *)data;
char* err = strstr((const char *)ptr,"550"); //error cannot convert const char** to char*
if(NULL != err) {
strncpy(error->data,(char*)ptr,LENGTH_...
Hey,
I'm very new to C++ operator overloading and having some teething trouble.
I've defined: 'void Graph::operator>>(const char* param)' to accept a string and
then input then perform certain actions on the object.
How do I call this function that I've defined (>>) ? In what ways can I use it?
...
Has anyone experienced with Common C++ Framework? Can it be used as a framework for a Telecom networking application?
...
OK so I have a C++ class that is exposed to Lua using SWIG. The script creates the object but a manager class also has a pointer to the object so it can be modified in C++(or another script) for whatever reason.
The problem is that when the script finishes the object is freed, how can I control what the Garbage collector collects withou...
When using std::map in c++, is it possible to store inherited classes as their "base class" in the map and still being able to call their overloaded methods? See this example:
#include <iostream>
#include <map>
class Base
{
public:
virtual void Foo() { std::cout << "1"; }
};
class Child : public Base
{
public:
void Foo(...
I have a vector of pointers that are not owned by the container. How do I use algorithms on the targets of the pointers. I tried to use boost's ptr_vector, but it tries to delete the pointers when it goes out of scope.
Here is some code that needs to work:
vector<int*> myValues;
// ... myValues is populated
bool consistent = count(my...
If I want to allocate a char array (in C) that is guaranteed to be large enough to hold any valid absolute path+filename, how big does it need to be.
On Win32, there is the MAX_PATH define. What is the equivalent for Unix/linux?
...
I need to find out how to get the time between 2 times, but only if it is within work hours(Stored in a database)
This is what I got for now, but it is totally wrong. the total won't bee correct.
int __fastcall Organisasjon::CalculateResponsetimeInOpeninghours(std::auto_ptr<DBCommand> cmd, long orgid, TDateTime starttimeIn, TDateTime e...
Hi
I am about to expose a service written in C# to a legacy C++ application using COM. What is the best approach to report errors to the unmanaged client? Throwing exceptions or simply return an error value?
Thanks,
Stefano
...
I have a variable declared like this:
int j=0;
When I write:
cout<<j++<<" "<<j++<<" "<<j++<<"\n";
I receive this output:
2 1 0
I expect to receive this output:
0 1 2
Could you explain the result?
...
Hi
I am trying to convert a project from vs2003 to vs2005.after conversion completed some include headerfile.h statement missing and generates include "serialize" .how to fix this.even i copy and paste.it prompts for the source would be modified outside the environment msg appears.
what can i do to fix this any idea???
Thanks in advance...
It's well-known that the order of evaluation of a function's arguments in unspecified and can differ between different compilers.
What doesn't seem so clear is whether function calls can be interleaved, in the following sense:
f(g(h()), i(j()))
Let's assume the compiler chooses to evaluate f's first parameter first. Is the compiler f...
I've got a linked list class and for some reason when I increment an int in one
object e.g linked1.size for some reason linked2.size also increments!
And ideas why this is? I didn't intentionally make it a static variable.
my code:
main()
{
Vlist v1;
v1.add(1,0);
v1.add(2,0);
Vlist v2;
}
Incrementing the size member vari...
I downloaded Chromium's code base and ran across the WTF namespace.
namespace WTF {
/*
* C++'s idea of a reinterpret_cast lacks sufficient cojones.
*/
template<typename TO, typename FROM>
TO bitwise_cast(FROM in)
{
COMPILE_ASSERT(sizeof(TO) == sizeof(FROM), WTF_wtf_reinterpret_cast_sizeof_types_is_equal...