|
|
Up |
|
|
  |
Author: subramanian100insubramanian100in
Date: Mar 3, 2008 21:56
For a type T, consider vector::value_type. When is this member
'value_type' useful; in other words, when is the use of value_type
unavoidable?
Kindly clarify.
The reason for asking this question is the following:
For a particular type T, say std::string, Suppose I use,
vector::value_type obj;
But, to initialize or assign a value to 'obj', we have to know the
actual type T. So we can simply declare
string obj;
In this example, the need for value_type is AVOIDABLE.
But there should be some genuine situation wherein the use of
value_type is UNAVOIDABLE. I am unable to come up with an example for
this unavoidable situation. Please clarify.
Thanks
V.Subramanian
|
| |
|
| |
2 Comments |
|
  |
Author: priya4upriya4u
Date: Mar 3, 2008 20:24
download students tutorials,ebooks,softwares here for Free!!!!
Download Softwares Ebooks Students tutorials Games Ring tones
Wallpapers and Lots of fun everything for FREE only at www.studentshangout.com
|
| |
|
| |
1 Comment |
|
  |
Author: yogi_bear_79yogi_bear_79
Date: Mar 3, 2008 17:49
I have a simple string (i.e. February 27, 2008) that I need to split
into three parts. The month, day, and year. Splitting into a string
array would work, and I could convert day and years to integers
later. I've bene looking around, and everything I see seems more
complicated than it should be! Help!
|
| |
|
7 Comments |
|
  |
|
|
  |
Author: Tomás Ó hÉilidheTomás Ó hÉilidhe
Date: Mar 3, 2008 10:33
What's the best book for reading up on the standard library, with
sample usages and the like? I read a book a few years ago by a guy
called "Andrei" that was pretty good, but I just want to check if it's
been surpassed in recent years.
Is there any book that includes the new stuff that's coming in with
the next C++ Standard?
Is Bjarne Stroustrup's book still the main book for the language
itself?
|
| |
|
5 Comments |
|
  |
|
|
  |
Author: fabio.mazzarinofabio.mazzarino
Date: Mar 3, 2008 09:18
James:
I have exactly the deadlock problem you have just described.
I have two pipes for reading and writing. After 20KB the pipe buffer
is full. Every reading from the pipe returns errno 11 (EAGAIN), and
the child process stop writing due to the buffer overflow.
The parent keeps waiting for the son to finish, while the son keeps
waiting for the parent to empty the buffer.
How can I solve this?
Fabio A. Mazzarino
James Kanze escreveu:
> On Jan 26, 9:11 am, FNX fnxweb.no.junk.please.com> wrote:
>> Around about 26/01/08 07:39, Rolf Magnus scribbled ...
>
>>> Not possible with the system() function. You need to use operating...
|
| Show full article (1.56Kb) |
|
1 Comment |
|
  |
Author: carmelocarmelo
Date: Mar 3, 2008 09:08
Hi! I wrote this function that shoul read dinamically a string, but
the compiler gimes me this error:
error C2440: '=' : cannot convert from 'void *' to 'char *'
Why?
char *read_string(void)
{
int i=1;
char *string, c;
|
| Show full article (0.50Kb) |
|
5 Comments |
|
  |
Author: siddhusiddhu
Date: Mar 3, 2008 08:43
Dear Experts,
I am getting a linker error in VC7.
I have written a singleton
//SysInfoFileManager.h
namespace SysInfo
{
class SysInfoFileManager
{
SysInfoFileManager(){}
SysInfoFileManager(const SysInfoFileManager&);
~SysInfoFileManager(){}
SysInfoFileManager& operator=(const SysInfoFileManager&);
static SysInfoFileManager* _pinstance;
public:
static SysInfoFileManager* instance();
//void trim(std::string& str);
};
}
|
| Show full article (1.33Kb) |
|
3 Comments |
|
  |
|
|
  |
Author: mohamed azazmohamed azaz
Date: Mar 3, 2008 08:01
hi
please can one tell me what does this code mean
HDC b=::GetDC(this->GetSafeHwnd());
thank you
bye
|
| |
|
2 Comments |
|
|
|
|
|
|