[Dev-C++] problem related to vc++ compiler
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: bhadram r. <bha...@ya...> - 2005-08-22 08:26:11
|
Dear per and friends,
I'd problem with vc++ compiler. I'm addding the haeder file as project->add to project-> and creating header file. But sometimes the compiler says as
cannot save the file the file may be in use by another application .
Actually I couldnt understand why it is happening. What does it mean and why it is behaving sometimes like that. Waiting for your responce.
Thanking you,
yorus truly,
bhadram
Per Westermark <pw...@ia...> wrote:
Happy to be able to help :)
/Per W
On Sun, 21 Aug 2005, bhadram rao wrote:
> Dear per,
> Thank you very much for the solution. yes that is the actual problem. Thank you again.
>
> Thanking you,
>
> yours truly,
> bhadram
>
> Per Westermark
wrote:
> Hi!
>
> You have defined a string conversion function that will return
> const char*
> but you are assigning to a non-const char* variable.
>
> See any problem somewhere ;)
>
> /Per W
>
> On Sun, 21 Aug 2005, bhadram rao wrote:
>
> > Dear friend,
> > I'd a problem. I'm using user defined conversion function char* to use like
> > char* ch=s1;(string object name); But the problem is that it is giving compilation error. It cannot able to find the conversion operator char*. Can any body solve my problem. Please help me in this aspect.I'd already defined user conversion operator. But still not working.
> > String::operator const char*() const
> > {
> > return buf;
> > }
> > yours friendly,
> > bhadram
> > D:\cpppractice\aug20\maincpp.cpp(12) : error C2440: 'initializing' : cannot convert from 'class bhadram::String' to 'char *'
> > No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
> > Error executing cl.exe.
> > maincpp.obj - 1 error(s), 0 warning(s)
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com |