newbie question (c++->c#)

A

.:alex:.

Hello,

I'm just starting to learn C# and I'm an C++ programmer. First of all
I'd like to know, which are the similarity between C# and C++.
in C#: there is class forwarding(how to use?), inline functions, global
functions and params...
Regarding STL, how to replace a map (CMap for MFC), list, vector, etc...
I can define templates classes?...

I have a lots of questions, but I think these are enogh for the moment.
:)

Can somebody tells me these tips?

Thank you in advance,

Alex
 
A

.:alex:.

Thank you a lot for your answer... "the what is new in c#" it is a good
start point.

Thank you a lot,

I'll be back with any another question...

Regards,

Alex
 
A

Abubakar

Hi
Regarding STL, how to replace a map (CMap for MFC), list, vector, etc...
I can define templates classes?...

yes templates in C# are known as Generics. They r available in .net version
2.0 not earlier. Lists and vectors, you can find a lot of data structures in
either System.Collections, or System.Collections.Generic namespace.
in C#: there is class forwarding(how to use?), inline functions, global

you mean that before using a class the way we forward declare like
class cmything;
If thats the case than you dont need forward declarations cuz all classes
are accessible within a namespace. Your classes can be in separate files but
you dont need to "include" any file to start using it, its just every where
with in a namespace.
As inlining is concerned, the inlining happens at the JIT level, and the JIT
thinks it knows better what to inline and what not so we dont have to worry
about that.
Global: there is a "global::" as a new feature which I think does the same
thing. Its also available in C# 2.0. Read the msdn "whats new in C#".

Oh and I noticed you didnt ask about the greate "function pointers". They
are called Delegates in .net. Greate feature you must check out :)

Ab.
http:://joehacker.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top