Hi. I would like to redefine a class in c++ (non clr). Here's the reason
class BabyClass
{
public:
string Name;
int getSiblings(MainClass &mclass)
{
int c = mclass.size();
for(int i=c;i>0;--i)
{
if(mclass.at(i).Name != Name)
cout << mclas...
Hello all,
i've created an C++ application using WinSck, which has a small (handles just a few features which i need) http server implemented. This is used to communicate with the outside world using http requests. It works, but sometimes the requests are not handled correctly, because the parsing fails. Now i'm quite sure that the requ...
What is the problem that no industrial level refactoring tool for C/C++ have been created, I only need a tool that "just works"?
What I mean by "industrial level" is a quality provided by JetBrains products (IntelliJ, ReSharper), or above. Any available solutions (including Visual Assist from Tomato Software or Eclipse CDT) are not matu...
Following code is in my c++ class
static const QString ALARM_ERROR_IMAGE ;
i want to initilize
ALARM_ERROR_IMAGE = "error.png";
Is it possible to initilize error.png to static const QString ALARM_ERROR_IMAGE
Want to keep it inside class
...
Hello,
I'm trying to make a simple Objective-C++ applicaiton. All of my code is compiling fine, including the use of C++ in Objective-C classes, until I try and add a C++ class to the mix. I've created a simple C++ class:
Test.h
class Test {
};
and included this file in a Objective-C class (with a .mm extension) and I get the fol...
Hi everyone, my question may be simple for you, but I have no experience about it. So, the problem is that I have a COM server and it is started from the context of another EXE, and I need to prevent this COM Server application to open a command prompt window, thanks in advance for your help.
...
Simple example:
template <class P> class MyT
{
struct Item
{
public:
Item() {}
P *pData;
Item *next;
};
Item *head;
public:
...adding etc..
P* operator [](int index)
{
See question below:
}
};
Can I somehow make sure that the 'Item's are allocated in such a way that I ...
How does for example components like the "Total Commander " search can open every file format
And search inside it ?
Is there free library that offer me such feature ?
Basically in the end I will like to extract texts from files be able to support all formats ( pdf,Microsoft doc ,chm …)
...
Hi,
I want to keep a static const variable as a member of class.
Is it possible to keep and how can i initilize that variable.
Some body helped by saying this
QString <ClassName>::ALARM_ERROR_IMAGE = "error.png";
http://stackoverflow.com/questions/3698446/initilizing-value-for-a-const-data
I tried like this
in CPP class i write...
I saw the documentation of that feature is seem pretty major since it's in Google Test overview features and detailed in: http://code.google.com/p/googletest/wiki/AdvancedGuide#Death_Tests
They look like standard assert() but they're part of Google Test, so a xUnit testing framework. Therefor I wonder the real usage or advantage of usin...
class Base{
public:
void counter();
....
}
class Dervied: public Base{
public:
....
}
void main()
{
Base *ptr=new Derived;
ptr->counter();
}
To identify that the base class pointer is pointing to derived class and using a derived member function, we make use of "virtual".
...
I need the above data structure for an application I'm writing. I wondered if there is a library that already implements it or if I have to write it myself?
I don't really want to reinvent the wheel if it is not necessary.
I need this structure to be able to add and remove items using multiple threads without having to lock up the who...
Has Bjarne Stroustrup made a comment about a language that isnt C or C++(0x)?
I saw his comments about C++ CLI but i havent seen him mention anything about another language. Such as D, python, javascript, OCaml, haskel, etc.
If so do you have a link?
(note: omg bjarne-stroustrup has his own tag!)
...
This question got me thinking. Sometimes it's useful to grab an actual argument from a class template specialization, if it fails to define a public typedef of the argument. In C++03 it's a sign of either bad template design, or contrary design intent, and not particularly common. But variadic templates make typedef coverage impossible, ...
I have a class A that I overload its operator=. However it is required that I need to do something like this:
volatile A x;
A y;
x = y;
which raised an error while compiling
error: no operator "=" matches these operands
operand types are: volatile A = A
If I removed volatile, it's compilable. Is there anyway to have this com...
What do these two strange lines of code mean?
thread_guard(thread_guard const&) = delete;
thread_guard& operator=(thread_guard const&) = delete;
...
This question has been bothering me for some time. The possibilities I am considering are
memcpy
std::copy
cblas_dcopy
Does anyone have any clue on what the pros and cons are with these three? Other suggestions are also welcome.
...
I'm trying to write a method to set 2 variables to the numbers in a char string. The string would look something like:
[-][1][ ][ ][ ][ ][2][.][0][4]
Where the numbers -1 and 2.04 could be extracted. I know the method signature could look something like this:
sscanf(array[i],"%d%f",&someint,&somedouble)
But I'm honestly not sure ho...
I have a certain library (IBM's WebSphere MQ) which I'm using, with an API that is suppose to return a remote servers character set.
After some debugging, it seems as though the return value of this function call returns the active code page of my machine. I saw this by looking at the return value of the function call and the result of...
I have an asynchronous dataflow system written in C++. In dataflow architecture, the application is a set of component instances, which are initialized at startup, then they communicate each other with pre-defined messages. There is a component type called Pulsar, which provides "clock signal message" to other components which connect to...