I'm kind of stuck here. I'm developing a custom Pipleline component for Commerce Server 2009, but that has little to do with my problem.
In the setup of the pipe, I give the user a windows form to enter some values for configuration. One of those values is a URL for a SharePoint site. Commerce Server uses C++ components behind all th...
hi,
my compiler is torturing me with this instantiation error which I completely don't understand.
i have template class listItem:
template <class T>
class tListItem{
public:
tListItem(T t){tData=t; next=0;}
tListItem *next;
T data(){return tData;}
private:
T tData;
};
if i try to initialize an object of ...
Say I have an object of type A having Initialize() method.
The method receives object B, which are kept as the object data member.
B object is shared between several objects, thus A should contain the originally received B object and not its copy.
class A
{
public:
bool Initialize(B?? b);
private:
...
I have a base wchar_t* and I'm looking to append another one onto the end. How do I do it? I cannot use deprecated functions as I am treating warnings as errors.
...
I have the need to store a list/collection/array of dynamically created objects of a certain base type in C++ (and I'm new to C++). In C# I'd use a generic collection, what do I use in C++?
I know I can use an array:
SomeBase* _anArrayOfBase = new SomeBase[max];
But I don't get anything 'for free' with this - in other words, I can't...
How can I delete the last character of a wchar_t* and resize accordingly? For example, having the string "test" and bringing it down to "tes"
...
Whenever someone starts using the STL and they have a vector, you usually see:
vector<int> vec ;
//... code ...
for( vector<int>::iterator iter = vec.begin() ;
iter != vec.end() ;
++iter )
{
// do stuff
}
I just find that whole vector<int>::iterator syntax sickitating. I know you can typedef vector<int>::iterator VecI...
I need to overload the stream extraction operator. I need to do this by allowing a user to input a string of characters at a prompt, say "iamastring", and then the operator would extract each character from the string and test whether or not it is whitespace and if it is not whitespace store it in a character array which is then passed ...
Is there're way to pass boost::tuple to printf()?
...
I am trying to search for a word using a key value recursively. In retrieve function:
Problem is the index goes from 0, 1,3,7, to 15.... it suppose to go 0,1,3,7,8 and so forth
I have the insert working as expected. I have the inorder, preorders, all working. Can someone please help me figure out this problem? I have been working on this...
I have a unsigned long integer value which represents a float using IEEE-754 format. What is the quickest way of printing it out as a float in C++?
I know one way, but am wondering if there is a convenient utility in C++ that would be better.
Example of the way that I know is:
union
{
unsigned long ul;
float f;
} u;
u.ul = 10...
I have a C++ project and a DLL library made using C#. Is it possible to add it to the C++ project and use its methods? I am using Visual Studio 2008
...
I was wondering what would be the best way to accomplish something like this...
// Iterating through a list
if ( foo ) {
RemoveBar( it );
}
void RemoveBar( std::list< Type >::iterator it ) {
it = listName.erase( it );
...// Other stuff related to cleaning up the removed iterator
}
I don't think pass by value will work here. Ob...
Extends.
I have:
struct Coord
{
int row, col ;
bool operator<( const Coord other.row other.col ;
}
} ;
I'm trying to create a map<Coord, Node*>, where you can look up a Node* by Coord.
The problem is, it has bugs. Lookups into the map<Coord, Node*> by Coord are returning the wrong ones.
I'm having difficulty figuring out ...
I'm using Qt (embedded) to make a GUI on a black and white screen. The problem is Qt renders text with shades of grey so it is unreadable on the black and white screen. Does anyone have any idea how to make the text just use 1 bit per pixel, or purely black and white?
Thanks,
Mark
...
I've recently been tinkering with a little gameproject using VC++ 2008. I'm using SDL, OpenGL, Boost and Box2D as included libraries. It works fine on my windows 7 machine, aswell as a friend's w7 machine. How ever it wont work on my second friend's XP sp3 machine, with the vc++ 2008 SP1 redist pack installed. When he starts the .exe he ...
The class std::wstring is missing some operations for "normal" c strings (and literals).
I would like to add these missing operations in my own custom class:
#include <string>
class CustomWString : public std::wstring {
public:
CustomWString(const char*);
const char* c_str(void);
};
The code above c...
Java/C# language lawyers like to say that their language passes references by value. This would mean that a "reference" is an object-pointer which is copied when calling a function.
Meanwhile, in C++ (and also in a more dynamic form in Perl and PHP) a reference is an alias to some other name (or run-time value in the dynamic case).
I'm...
i know i can connect multiple slots to the same signal.
but Can I do it the other way round? having 3 signals connected to the same slot?
anyone ever tried this?
thanks a lot!
...
Hi,
How do I create a C++ weighted Graph where each vertex in the graph has a weight (some integer value)?
You can download my graph project here (RapidShare):
Here is the function to create a graph from graph data stored in a text file:
void GraphType::createGraph()
{
ifstream infile;
char fileName[50];
int index;
in...