This is a discussion on How to do a type conversion in VC++ .NET? within the C and C++ Programming forums, part of the Software Development category; How to do a type conversion in VC++ .NET?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, We can convert the Char * into string eachother using the following line. const char *val = "test"; std::string valString(val); Now valString contains "test". std::string val = "test"; char * valChar = new char[val.length()+1]; strcpy(valChar, val.c_str());
__________________ The OXYGEN Delivers edgy, intelligent Technology to all... |
| |||
| The actual question does not specify which datatype has to be converted. In general, Type casting can be used to convert between datatypes. eg:- float f=5.5; int i=(int)f; |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| conversion from ogg to mp3 | JSureshkumar | Operating Systems | 33 | 04-10-2008 09:44 PM |
| Conversion error | Kirubhananth | ASP and ASP.NET Programming | 4 | 03-12-2008 10:03 PM |
| Conversion constructor | vijayanand | C and C++ Programming | 0 | 09-21-2007 03:36 AM |
| What is Value type and reference type in .Net? | anbuchezhians | VB.NET Programming | 2 | 08-21-2007 10:42 PM |
| Type conversion from arraylist to string in C# | oxygen | C# Programming | 3 | 07-30-2007 09:47 AM |