This is a follow-on question to
http://stackoverflow.com/questions/2748866/c0x-rvalue-references-and-temporaries
In the previous question, I asked how this code should work:
void f(const std::string &); //less efficient
void f(std::string &&); //more efficient
void g(const char * arg)
{
f(arg);
}
It seems that the move overload...
I'm looking for independent implementation of boost/tr1 shared_ptr, weak_ptr and enable_shared_from_this.
I need:
Boost independent very small implementation of these features.
I need support of only modern compilers like GCC-4.x, MSVC-2008, Intel not things like MSVC6 or gcc-3.3
I need it to be licensed under non-copyleft LGPL compa...
I have in Visual Studio 2008 a .NET 3.5 C# project that uses a dll compiled from a C# project (let's call it dll A). Dll A is using on his turn some C++ libraries.
The problem is that when I encounter an error while calling objects from dll A, the application just closes, without showing any error. But I need to know what's the problem,...
What is exactly richtext and how do I format data in richtext in QTextEdit?
...
If I write
int main()
{
int a[100] = {1,2,3,4,};
cout<<sizeof(a)/sizeof(a[0])<<endl; //a is a pointer to the first elem of array,
//isn't it
return 0;
}
I get 400!
If I write
void func(int *a);
int main()
{
int a[100] = {1,2,3,4,};
func(a);
return 0;
}
void func(int...
class anurag
{
private:
int rollno;
char name[50];
int marks;
float percen;
void percentage(int num)
{
percen=(num/500)*100;
}
public:
void getdata(void)
{
cout<<"\n\nEnter the name of the student:";
gets(name);
cout<<"\n\nEnter the roll no: and the marks:";
cin>>rollno>>marks;
percentage(marks);
}
void display(void)
{
cout<<"\n\nTh...
myPreciousFunction(std::string s1 = "", std::string s2 = "")
{
}
int main()
{
myPreciousFunction();
}
can i make the arguments look any more prettier? i want there to be empty string if no arguments were supplied.
...
hello, how would i read keystrokes using the win32 api? i would also like to see them from international keyboards like german umlauts.
thanks
...
Yea this is a dumb question... However in both of my C++ classes we did not do this at all (except for native libraries: iostream, iomanip, etc.)... My question is can anyone provide a link that gives the general explanation of adding libraries to C++?
I do realize what what #include means; it's just I have no clue on the linker/direct...
I'm thinking of creating a drawing program with layers, and using GDI+ to display them. I want to use GDI+ because it supports transparency.
The thing is, drawing lines to the DC is very fast, but drawing directly to a bitmap is very slow. It is only fast if you lock the bits and start setting pixels. Can I draw to multiple DC's in my W...
I'm planning on learning 3d game development for the iphone using a 3d engine, but because of lack of tutorials for the iphone I was planning on using C++ game tutorials and making the necessary changes.
The problem is that I've had limited success when searching for things such as 'c++ 3d fps tutorial ' I dont really get anything usefu...
Hi there, I am very new to this site and to programming. I started doing some basic programming with python a few weeks ago and recently, messing around with Java basics.
My main problem is that I am completely overwhelmed and haven't got the slightest clue where I should be starting.
I want to learn programming because I really enjoy ...
Hi all,
in C++, when you define a function which takes one argument, you have to define the data type of that variable:
void makeProccess(int request)
However, I want to implement a function which takes different data types rather taking statically defined integer type.
void makeProccess(anyType request)
How can I design a procces...
I was just musing about the number of questions here that either are about the "big three" (copy constructor, assignment operator and destructor) or about problems caused by them not being implemented correctly, when it occurred to me that I could not remember the last time I had implemented them myself. A swift grep on my two most activ...
I just simply include gdiplus.h and get all these errors:
Warning 32 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1133
Warning 38 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gd...
Is it possible to load an image file into opengl? We are developing a realistic scene of a robot in both linux and VC++.
What libraies and methods are available to insert an image? also link good examples and references.
...
Hi,
I have Ubuntu 8.04 running on a Xen based VPS server that runs on a dual-core AMD Opteron 64-bit machine.
I have some locally developed C++ based daemons that I would want to deploy in that machine. My local machine is a 32 bit Ubuntu 9.04 running on an Intel core 2 duo laptop.
Can I execute binaries compiled from source code ...
Hi,
I don't like to use <iostream> in C++ Library. I prefer to use something that is similar to "printf" and "scanf" in <stdio.h>.
Can I use Boost's format library to replace <iostream> in all my C++ program ?
...
Does anybody know of any libraries that use design patterns that are implemented using compile-time techniques e.g. template metaprogramming? I know that Loki implements a few but I need to find other libraries.
...
I have two classes, one inherited from the other. When I compile, I get the following errors:
Entity.obj : error LNK2019: unresolved external symbol "public: __thiscall Utility::Parsables::Base::Base(void)" (??0Base@Parsables@Utility@@QAE@XZ) referenced in function "public: __thiscall Utility::Parsables::Entity::Entity(void)" (??0Ent...