|
Using VC++ compiler on Windows has nothing to do with compiling on other platforms. If you write portable code, it will compile on any standard-conforming C++ compiler including VC++.
|
|
|
|
|
Okay. So I shoud not use any MFC classes. Use plain C++ classes for it, right?
|
|
|
|
|
Christian Flutcher wrote: Okay. So I shoud not use any MFC classes. Use plain C++ classes for it, right?
Right. Using the VC++ IDE not necessarily mean using MFC or ActiveX, which are specific to Windows. I just typed that out to you on another reply and you've posted it at the same time.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Christian Flutcher wrote: But this class should compile with other compilers which are in LINUX and MAC. So I think, using VC++ compiler won't allow me to compile the same code on other platforms.
Using the Visual C++ IDE necessarily not mean using the Windows API and Windows specific things like MFC, ATL, etc,.
As another user pointed out, write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps
Indeed. I am cleared now. Thanks.
BTW, all these C++ things are bit confusing compared to C#, isn't it?
|
|
|
|
|
Christian Flutcher wrote: BTW, all these C++ things are bit confusing compared to C#, isn't it?
Definitely NO. The managed world is a much larger mess when compared. There is a new .NET framework for download, every couple of days. There is a new technology every fortnight. By the time you finish mastering a new feature related to C#, that becomes obsolete. But that's not the case with C++. It is an old-timer language and exists for a "different" purpose. By all means, we should not compare C++ and .NET. One is a language and another is a framework. They both serve for different purposes and as I've said several times, they cannot rival each other on what they were built to do. But to my fortune, .NET was built with C++. Or just to be rude, "My compiler compiled your compiler".
C++ is just C++. Things like MFC, VCF, etc., are frameworks that are built with and built to work with C++, which might be confusing at the beginning. I suggest that you master the actual language itself first and then move on to technologies that were built with C++. I talked too much - but hey, that's your fault.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
That's why I love C++ than anyother language and trying my best to learn it. People like you are a real inspiration.
Rajesh R Subramanian wrote: I talked too much
I loved that.
|
|
|
|
|
Last question,
Is it possible to use reflection in standard C++? I need to invoke a class from it's name. It's trivial in C# .NET like Activator.CreateInstance will do, but what about C++?
|
|
|
|
|
Christian Flutcher wrote: Is it possible to use reflection in standard C++?
With standard C++, NO. Reflection is something that is within the managed (.NET) world. I would also recommend that you start a new thread if you have a "totally new" question. That would kinda fetch replies from more people and give more visibility to your query.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Okay. I should stop bothering you now. I will look into the reflection stuff later. Thanks for the help and have a great day.
|
|
|
|
|
|
IPC[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
prviously i tried with sockets for bluetooth programming but i found microsoft supports only a few dongle so now i decided to go with serial communication, so any body have tutorials or any materials regarding this if plz.. post me...
|
|
|
|
|
hi...
I have a CString like CString str ="1,2,3,4,5,6";
now i want to retrieve each one as string like
str1=1;
str2=2;
str3=3;
here "," is delimeter.
Even this is so simple... but i am not familier with CString methods.
please help me in this regard
Thanks in advance....
Regards
varma.
|
|
|
|
|
Use AfxExtractSubString function!
Regards,
Rane
|
|
|
|
|
See CString::Tokenize
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
you can do like this.
CString out = "1,2,3,4,5,6";
out.Replace(_T(","), _T(""));
int len = out.GetLength();
for(int i=0;i<len;i++)>
{
String[i] = out.Mid(i,1);
AfxMessageBox(String[i]);
}
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Thanks....
But i have Two digit nubers also.....
like
CString out={"1,10,345"};
then how to do...
Thanks in advance
varma
|
|
|
|
|
|
The people who have used eMule knows that There are a few buttons on top of the background Dialog(The buttons actually is in a CToolBarCtrl).
Click each button, the background dialog shows an associated view(Actually CDialogs)
I read the code of eMule, and code as it, but I Can't pass.
I'm so down in spirits. Can I send the code to somebody and give me a hand?
|
|
|
|
|
fantasy1215 wrote: Can I send the code to somebody and give me a hand?
To do what? What is it you're trying to do.
|
|
|
|
|
In the background dialog, On top of the background dialog there is a CToolbarCtrl with many buttons. When click each button there to show associated dialog(all without title bar styles) embeded in the background dialog.
|
|
|
|
|
Take CArray for example, it has two member functions as below:
TYPE& GetAt(
INT_PTR nIndex
);
const TYPE& GetAt(
INT_PTR nIndex
) const;
When do a function call, does the return value type determines which one to call?
Is it a standard of C++?
system
modified on Wednesday, September 3, 2008 11:43 PM
|
|
|
|
|
That's an overloaded function, not an override.
C++ doesn't allow overloads that only differ by return
type, but it does allow overloads that differ by const.
Which one gets used depends on the context of the call.
For example, if you have a const reference/pointer to an
array and you call GetAt(), it will use the const function
overload, which wil return a const reference. Since the returned
reference is constant, you can't modify the object or call any methods
that modify the object, which preserves the const state of the array
referenced or pointed to by the original const array reference/pointer.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|