Hi!
In the following code:
using namespace std;
//ostream& operator<< (ostream& out,const string & str)
//{
// out << str.c_str();
// return out;
//}
int _tmain(int argc, _TCHAR* argv[])
{
ofstream file("file.out");
vector<string> test(2);
test[0] = "str1";
test[1] = "str2";
ostream_...
Hello!
Is there any way to achieve the specified behaviour? If there is some trick or this could be done using traits or enable_if, please let me know.
template <typename T> struct Functional {
T operator()() const {
T a(5);
// I want this statement to be tranformed into
// plain 'return;' in...
Say you are writing a 3d renderer with support for multi-texturing, where the number of texture units is configured through a compile time constant. Opposed to hard coding a single texture unit, your'e code now has to access texture-related parameters through arrays, and handle them through loops.
Assuming a modern C++ compiler, are the...
Hi,
I have a class which contains boost::function as one of its arguments. I have to make this class equality comparable but the boost::function is not equality comparable. Is there a easy workaround for this problem?
Thanks,
Gokul.
...
Is there a C++ variant for the long primitive data-type?
A C++ long is only 4 bytes, while a Java long is 8 bytes.
So: Is there a non-decimal primitive type with a size of 8 bytes in C++?
Maybe with some tricks?
Thanks
...
I want to generate a csv file containing numbers and I want Excel to read that file automatically.
However, Excel uses a different csv format depending on the locale settings. For example:
English:
Text separator: ,
Decimal separator: .
Spanish:
Text separator: ;
Decimal separator: ,
Is it possible to automatically detect thos...
Hi all,
I'm looking for a light-weight Prolog engine to be embedded in an Obj-C application under Mac OSX. In Java there are some excellent implementations with the characteristics I need: deployability, lightness, dynamic configurability, integration with Java and ease of interoperability.
Can you recommend something similar in C/C++?
...
In C/C++ under Linux, I need to allocate a large (several gigabyte) block of memory, in order to store real-time data from a sensor connected to the ethernet port and streaming data at about 110MB/s. I'd like to allocate the largest amount of memory possible, to maximise the length of data sequence that I can store. However, I also need ...
I had an exam yesterday for Programming I at the end of my first semester. It was pretty basic, except I made a really, really obscure mistake that I wanted to ask the more experienced people here about:
I basically had a class Library that contained a vector that contains elements of Loan* which contains a Customer and Book class. Kind...
I'm having a problem with a couple of event handler classes I'm trying to write. Basically, the idea is to have an event handler class for each logical group of objects. In most cases, the events are between objects and their handler, but in some cases events are also sent between handler objects as well.
I've written the code such that...
I don't really understand, how can Erlang be more efficient than C++?
...
I have not used graphs in c++. I would like some to kindly help me in careating a graph in c++. Kindly provide me with source code for graph. So that i could take start with graphs usage.
...
Why does boolean data type accept true or false values only, why cant it accept 0 for nothing (which is neither true nor false)?
...
Does it make any sense to contribute to KDE lately, now that all that's "cool" is being moved in the cloud?
It seems like these guys are in need of some contributors and I was wondering whether it's a good C++ code base to learn from and gain experience or it's better to get involved in something that has more momentum ?
...
Hello,
i need to validate whether given binary is a PE file or not. e.g if I rename jS/HTML or .class files to .exe or .dll , it won't be PE files still then. Parsing PE these files would give me info about this problem. What field indicates that given binary is a valid PE file or not..?
Note : I have checked about "e_magic" field of ...
Possible Duplicate:
What is the difference between an int and a long in C++?
in C++, why is there the need of datatypes int and long int. Both occupy same memory (4 bytes) in 32 bit system
i hav simliar doubt , y is there char and wchar_t....y cant we use one datatype both intake similar values
...
Is there any special significance to defining constant data inside a structure as shown. This is from a 3rd party library.
typedef struct
{
IntVB abc_number;
#define ABC_A 0x01
#define ADBC_E 0x02
IntVB asset;
} StructA;
...
template <typename T>
class Table {
public:
Table();
Table(int m, int n);
Table(int m, int n, const T& value);
Table(const Table<T>& rhs);
~Table();
Table<T>& operator=(const Table& rhs);
T& operator()(int i, int j);
int numRows()const;
int numCols()const;
void resize(int ...
Hello!
I have some mid-large project that is actively using boost libraries and, hence, suffers in terms of Debug application performance (Visual Studio 2008).
Solution that I use right now means turning on function inlining even in Debug mode, which brings enough performance, but should definitely have some drawbacks.
Does anyone kno...
how often used such kind of expression in c++
#ifdef __BORLANDC__
#pragma argsused
#endif
and also there is given code for assembler code in c++
#ifdef __BORLANDC__
#pragma argsused
#endif
#include <iostream>
using namespace std;
int main( int argc, char * argv[] )
{
int Number1, Number2, Result;
__asm
...