C++ : Is it lots harder than c# and VB

Hi everyone,

I learned Java whilst at university and have taught 
myself c# and VB.net. I think I am ok at it.

I was thinking, these languages will probably be bigger 
in the future so I better get ready for them. But then, I 
also realised that COM is still quite important and so is 
C++. So I thought I better just try and have a look at 
C++ and COM.

And now I'm scared.

So my question is - why does C++ look so much harder than 
c#? For example :

1. The methods all have really stupid names that are hard 
to descern a function from.
2. You need to think about pointers and cleaning up 
memory.


But in my preffered languages, I dont even need to think 
about that. Why do I need to worry about these things in 
C++ and is C++ really that hard - at the moment, it looks 
as scarry as my Gran

Oh, and just how hard is it to learn COM - I've been 
looking all over the place and even the com section on 
MS's site doesnt really have that much for absolute 
beginners!

Thanks all

Simon
0
sh856531 (3)
10/4/2003 1:47:37 PM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
740 Views

Similar Articles

[PageSpeed] 40

If you enjoyed Java, you'll probably have no problems with C++.  If looking
at it scared you, it was probably ugly source code (which you can see in
Java BTW...)  Get a good book on C++, the old "Interactive" series was great
as was the old "Object Oriented Programming in C++."  These are good books
for starters.  If you've really learned Java then you've got the major C++
hump out of the way, learning about why/what/how objects work.

    WTH

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:110a01c38a7e$122ff0f0$a101280a@phx.gbl...
> Hi everyone,
>
> I learned Java whilst at university and have taught
> myself c# and VB.net. I think I am ok at it.
>
> I was thinking, these languages will probably be bigger
> in the future so I better get ready for them. But then, I
> also realised that COM is still quite important and so is
> C++. So I thought I better just try and have a look at
> C++ and COM.
>
> And now I'm scared.
>
> So my question is - why does C++ look so much harder than
> c#? For example :
>
> 1. The methods all have really stupid names that are hard
> to descern a function from.
> 2. You need to think about pointers and cleaning up
> memory.
>
>
> But in my preffered languages, I dont even need to think
> about that. Why do I need to worry about these things in
> C++ and is C++ really that hard - at the moment, it looks
> as scarry as my Gran
>
> Oh, and just how hard is it to learn COM - I've been
> looking all over the place and even the com section on
> MS's site doesnt really have that much for absolute
> beginners!
>
> Thanks all
>
> Simon


0
spamsucks (94)
10/4/2003 3:50:23 PM
Simon,

> 1. The methods all have really stupid names that are hard
> to descern a function from.

I'm not sure why you say this. When writing C++ code, you can call the
methods whatever you like.

> 2. You need to think about pointers and cleaning up
> memory.

Yes, and this is a bit confusing for some. However, memory you allocated
needs to be freed--it isn't all that complicated.

> But in my preffered languages, I dont even need to think
> about that. Why do I need to worry about these things in
> C++ and is C++ really that hard - at the moment, it looks
> as scarry as my Gran

Well, if you want easy--you might try something like Visual Basic. If you
want more power and control, then you'll need to use a language that
requires you to be aware of a few more things.

C and C++ are, by far, my favorite languages. It's a personal thing so that
doesn't mean to much but what I like about them are the simplicity and
flexibility--things that don't always go together.

However, that said, I'm not sure if I'd choose to learn those languages at
this time. While COM is still important, it is on it's way out. And there
will undoubtedly be something else after .NET. So I personally think it
makes more sense to be learning things that are on the way in rather than
out. But, in the end, it depends on exactly what you want to accomplish.

Jonathan


0
jwood (1291)
10/4/2003 6:27:59 PM
Simon Harvey wrote:

> Hi everyone,
> 
> I learned Java whilst at university and have taught 
> myself c# and VB.net. I think I am ok at it.
> 
> I was thinking, these languages will probably be bigger 
> in the future so I better get ready for them. But then, I 
> also realised that COM is still quite important and so is 
> C++. So I thought I better just try and have a look at 
> C++ and COM.
> 
> And now I'm scared.
> 
> So my question is - why does C++ look so much harder than 
> c#? For example :
> 
> 1. The methods all have really stupid names that are hard 
> to descern a function from.
> 2. You need to think about pointers and cleaning up 
> memory.
> 
> 
> But in my preffered languages, I dont even need to think 
> about that. Why do I need to worry about these things in 
> C++ and is C++ really that hard - at the moment, it looks 
> as scarry as my Gran
> 
> Oh, and just how hard is it to learn COM - I've been 
> looking all over the place and even the com section on 
> MS's site doesnt really have that much for absolute 
> beginners!
> 
> Thanks all
> 
> Simon

Java and C# and VB all need huge libraries.  The libraries define the 
language and what it can (and can't) do.

C++ needs no such library.  The CPU and Win APIs define what it can and 
can't do.  C++ programs the "real" computer, which depends fundamentally 
on things like pointers and "cleaning up" memory.  The library-based 
languages program an abstract machine that is implemented by the 
library.  The abstract machines are deliberately designed to make things 
simpler, at the cost of some loss of power and performance.

Yes, C++ is lots harder.  It is most appropriately used to do work that 
is lots harder.  If all you have to respond to is user clicks then you 
probably don't need it.

-- 
Scott McPhillips [VC++ MVP]

0
scottmcp (342)
10/4/2003 6:55:43 PM
Well C++ is a lot harder, because C*, Java etc are designed to be easier.

In those languages, you are basically writing scripts which are then 
read by a real program which does the actual execution.

There is nothing wrong with this if it achieves the results you want, 
but you are limiting your potential for ever writing real programs in 
other environments.

Using pointers, freeing up memory and interfacing with devices etc are 
an integral part of the art of programming.

Simon Harvey wrote:
> Hi everyone,
> 
> I learned Java whilst at university and have taught 
> myself c# and VB.net. I think I am ok at it.
> 
> I was thinking, these languages will probably be bigger 
> in the future so I better get ready for them. But then, I 
> also realised that COM is still quite important and so is 
> C++. So I thought I better just try and have a look at 
> C++ and COM.
> 
> And now I'm scared.
> 
> So my question is - why does C++ look so much harder than 
> c#? For example :
> 
> 1. The methods all have really stupid names that are hard 
> to descern a function from.
> 2. You need to think about pointers and cleaning up 
> memory.
> 
> 
> But in my preffered languages, I dont even need to think 
> about that. Why do I need to worry about these things in 
> C++ and is C++ really that hard - at the moment, it looks 
> as scarry as my Gran
> 
> Oh, and just how hard is it to learn COM - I've been 
> looking all over the place and even the com section on 
> MS's site doesnt really have that much for absolute 
> beginners!
> 
> Thanks all
> 
> Simon

0
isemmel (236)
10/4/2003 6:56:01 PM
Excellent answers guys

Thanks very much

Simon
0
blah5928 (43)
10/4/2003 7:43:42 PM
Jonathan makes good points, but as an aside, until another method for
providing components to more 'managed' languages comes along to replace COM,
it isn't likely going anywhere soon...

    WTH

"Jonathan Wood" <jwood@softcircuits.com> wrote in message
news:ON8FTUqiDHA.1940@TK2MSFTNGP09.phx.gbl...
> Simon,
>
> > 1. The methods all have really stupid names that are hard
> > to descern a function from.
>
> I'm not sure why you say this. When writing C++ code, you can call the
> methods whatever you like.
>
> > 2. You need to think about pointers and cleaning up
> > memory.
>
> Yes, and this is a bit confusing for some. However, memory you allocated
> needs to be freed--it isn't all that complicated.
>
> > But in my preffered languages, I dont even need to think
> > about that. Why do I need to worry about these things in
> > C++ and is C++ really that hard - at the moment, it looks
> > as scarry as my Gran
>
> Well, if you want easy--you might try something like Visual Basic. If you
> want more power and control, then you'll need to use a language that
> requires you to be aware of a few more things.
>
> C and C++ are, by far, my favorite languages. It's a personal thing so
that
> doesn't mean to much but what I like about them are the simplicity and
> flexibility--things that don't always go together.
>
> However, that said, I'm not sure if I'd choose to learn those languages at
> this time. While COM is still important, it is on it's way out. And there
> will undoubtedly be something else after .NET. So I personally think it
> makes more sense to be learning things that are on the way in rather than
> out. But, in the end, it depends on exactly what you want to accomplish.
>
> Jonathan
>
>


0
spamsucks (94)
10/4/2003 8:59:48 PM
WTH,

> Jonathan makes good points, but as an aside, until another method for
> providing components to more 'managed' languages comes along to replace
COM,
> it isn't likely going anywhere soon...

Can you clarify this? Hasn't .NET done exactly this already?

Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com


0
jwood (1291)
10/5/2003 2:27:34 AM
Reply:

Similar Artilces:

How to build a project in Visual C++.net developed in Visual C++ 6
Hi, I am Nageshwar. I have developed a project in VC++ 6.0 and OpenGL. I have installed VC++.net in my system. When I compile and build the same code in VC++.net environment, I am getting errors. I have used fstream.h to read and write to files. But this header file is showing errors in VC++.net. I have used iostrea.h header. This is also showing erros. I think I need to use a different version of headers. Please suggest me how to recover from these errors. Which header file I have use instead of fstream.h header? etc., Thanks for all who help me.. Awaiting an early response, Nageshwar ...

C: Drive documents and setting expansion
Whenever I, Right Click Start then click "Explore", I get an expansion of the my user ID folders. Now, I rarely us "Documents and Settings" and would like to have it expand differently. What do I need to change so that can happen?? Thanks.. Bruce A. Julseth wrote: > Whenever I, Right Click Start then click "Explore", I get an > expansion of the my user ID folders. Now, I rarely us "Documents and > Settings" and would like to have it expand differently. > > What do I need to change so that can happen?? 1. You could ...

Using XSL in VB.net
All I want to do is execute a simple transformation in VB.net.... I know this has to be simple. I tried the following as suggested by a web page I found.... Dim xslt as New XslTransform() xslt.Load("Filename") xslt.Transform("InFile", "ResultFile") This appears to be very straightforward to me. However, this causes an error saying the code is obsolete... (I thought the whole Framework version concept meant backwards compatability, but I guess not.) it further says "You should pass XmlResolver to Transform() method" Can anyone tell me how / where...

Create timeline for 2500 B.C. to 100 B.C.?
Visio only allows me to create timeline for after 1900 AD. Can I use Visio to create a timeline for 2500 BC to 100 BC? Visio's Divided timeline has exactly what I need except I can not enter BC as the start and end time. And Visio always require end time to be greater than the start time. Any suggestion on how I can do this in Visio? You're not going to be able to use the timeline because the code is linked to the system clock (only goes back to 1900). You'll have to use the vanilla shapes that come with visio. Al "Little Black Sheep" <Little Bl...

Visual C++ to read Strings from Serial Port
Hi. I'm doing a project using Visual C++ to read data from Serial Port. My program needs to do *something* when it receives specific data. For eg, if the program receives "Alarm 1 Zone 4", it will do something. The data received will be variable in length. My questions: 1) Any recommendations for the serial Comm Class for Visual C++? 2) How can i compare the data i receive from serial to the specific messages i'm looking for, eg data types, size of data types, limitations & etc.? Thanks. Any comments are highly appreciated. Leng As far as the serial part goes, it i...

C++ : Is it lots harder than c# and VB
Hi everyone, I learned Java whilst at university and have taught myself c# and VB.net. I think I am ok at it. I was thinking, these languages will probably be bigger in the future so I better get ready for them. But then, I also realised that COM is still quite important and so is C++. So I thought I better just try and have a look at C++ and COM. And now I'm scared. So my question is - why does C++ look so much harder than c#? For example : 1. The methods all have really stupid names that are hard to descern a function from. 2. You need to think about pointers and cleaning up ...

C#.net windows application
Since I am new to c#.net 2008 but I have worked a little with visual basic.net 2005, I have the following questions I would like to ask: 1. When I am looking at a .sln file that I will be maintaining a work, I can see there are lots of static void Main() methods in a file called program.cs throughout the solution in separate folderts. Can you tell me the purpose of this kind of code? Does this instantiate an object, is this a class libary member? 2. When running the C#.net 2008 professional version windows application, how do I know which 'main' method is being called? ...

MFC DLL Calling C# Assembly
I have been trying to get a simple mfc dll I wrote to add to numbers call a C# assembly. Here is a sample of my C++ code in my cpp file. extern "C" _declspec(dllexport) int Calc(int no1,int no2) { //result = no1 + no2; return MangedAdder(no1, no2); } #pragma managed #using <mscorlib.dll> #using <ControllerLibrary.dll> int MangedAdder(int a, int b) { ControllerLibrary::DLLController *t = new ControllerLibrary::DLLController(); return t->AddNumbers(a, b); } All I really need is an extern function in a mfc dll that calls a me...

Type Casting in C and C++
Hello NG As an old style programmer I've been casting values with the C-syntax like: double dVal=3.14; float fVal = (float) dVal; but now I've been told that the C++ syntax should do a better job float fVal = static_cast <float>(dVal); for some reason. Is this true? Will the C++ compiler really generate different (better?) code or is it simply more writing I have to do? Thanx Richie >As an old style programmer I've been casting values with the C-syntax like: > >double dVal=3.14; >float fVal = (float) dVal; > >but now I've been told that the C+...

OT: If you use a lot of hotkeys, bookmark this site
If you are like me and use a lot of Hotkeys, this is a kick butt website!!! I thought I knew a lot of shortcuts but this place is amazing. Gotta bookmark it. http://allhotkeys.com/ -- Ok, I admit it, I killed Barney!! http://www.lockergnome.com/darksentinel You know what to do with the munge DarkSentinel <darkmungesentinel@munge.charter.munge.net> wrote: > If you are like me <snip> No, I'm not like you - I don't spam newsgroups. Reported. From: "DarkSentinel" <darkmungesentinel@munge.charter.munge.net> Newsgroups: microsoft.public.outlook Subje...

C, C++ and C# Forums
Throne Software has opened up C, C++ and C# Forums at: http://www.thronesoftware.com/forum/ Join us! ...

Click on mailto in outlook2003 open a lot of i.e windows
hi, i'm using outlook 2003 and when i click one on the mailto link (in a mail i recieved), IE open more than 20 windows instead opening oulook new message. ty for your help regards emk emeric <emk@free.fr> wrote: > i'm using outlook 2003 and when i click one on the mailto link (in a > mail i recieved), IE open more than 20 windows instead opening oulook > new message. In IE, try this: click Tools>Internet Options>Programs>Reset Web Settings. Let us know if it changes anything. -- Brian Tillman Brian Tillman a �crit : > emeric <emk@free.fr&...

C# extension functions using MSXML?
I'm having performance/memory problems using .NET's XslTransform class so I thought I'd give the MSXML object's a whirl. The question I haven't been able to find in these groups is can I use C# extension functions with the MSXML objects? More specifically to use a C# class which has all my extension functions. I've seen examples where the stylesheet uses the <msxsl:script> element and embeds C# code, but that's not a viable solution for my situation since I'll be maintaining lots of different stylesheets which require the same extension functions. (if ...

Hey /w VB Code...
I had this code to switch my view every hour to the Outlook main screen; but it no longer works /w Outlook 2003 - can anyone help? Thanks in advance! Dim iHour Private Sub SwitchView() If Hour(Now) <> iHour Then Dim ctl As Office.CommandBarControl Dim cbpop As Office.CommandBarPopup Dim cb As Office.CommandBar Set cb = Application.ActiveExplorer.CommandBars("Menu Bar") Set ctl = cb.FindControl(ID:=5599, Recursive:=True) ctl.Execute iHour = Hour(Now) Set ctl = Nothing Set cb = Nothing End If End...

Application crashing because of chkesp.c error..
Hi, File : i386\chkesp.c Line : 42 The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. What does this error mean ?/ The executable runs perfectly on my machine but when i give it on to the client machine.. it crashes while loading.. I need to solve this issue.. how can I ?? ===== Regards, Jigar Mehta A calling convention is the protocol used to call the function (how parameters are passed and the stack is restored). Y...

for some reason when i deploy my C# application on windows 2003 occasionaly rdr[0].ToString() hangs where rdr is a System.Data.SqlClient.SqlDataReader. Is there a fix for this? is my visual studio.net
for some reason when i deploy my C# application on windows 2003 occasionaly rdr[0].ToString() hangs where rdr is a System.Data.SqlClient.SqlDataReader. Is there a fix for this? is my visual studio.net out dated? Hi, 1. Does this seem to you to be the right Newsgroup to ask this question ? I would have suggested "microsoft.public.dotnet.framework.adonet". 2. Is there supposed to be a difference between the Message Subject and the Message body ? Isn't the Message Subject supposed to be abbreviated ? 3. As for your question : I strongly doubt if your VS.NET can be called "o...

Money 2005 'C' Column
I have several bank accounts that I track on my computer using Microsoft Money 2005; I store the data online, so that it can be accessed and edited by two users. A co-worker also uses the same data online; the deposits and checks written show up correctly, no matter which of us has entered the information. What does not show up is an entry in the reconciliation column. The reconciliation is done on my system. Then, the entries that are marked with a “C,” don’t display a “C” for my co-worker. She can never tell which entries have cleared the bank. It is a puzzle why all the informa...

Hyperlinks with C++ 6.0
Hi, I hope this is the right place to post this question, it has to do with mfc i guess. I'm trying to hyperlink, a C++ application to a Microsoft Excel spread sheet. Basically I want to simply open a file in Microsoft Excel. Does anyone know of any ways of doing this? or any available ActiveX controls which I can use to do this? I have also tried to use the Microsoft Office Spreadsheet control version 9 and 10, and I just cannot get these to work. When I insert them into my application, it just does not run properly. It starts up, but it does not show any dialog boxes, just wast...

C# windows service freezes on System.Diagnostics.Process.Start(info)
C# windows service freezes on System.Diagnostics.Process.Start(info) When I launch PSCP from a C# windows service and launch pscp 0.53 there are no issues. but when I use C# windows service to launch pscp 0.58 C# freezes in System.Diagnostics.Process.Start(info)? pscp 0.58 works fine at command line, but causes C# to freeze on ystem.Diagnostics.Process.Start(info) also i noticed that the pscp process does not show in taske manager while ystem.Diagnostics.Process.Start(info) is hanging. Reguardless of the implementation of PSCP, how can ystem.Diagnostics.Process.Start(info) ever freeze ...

c/c++/vc++
Hi All, I want to learn c/c++/vc++ from the basics to attend an exam. I know there are many sites for that but what i want is the one in which there is a Question and Answer scenario so that i can brush them once. any help would be greatly appreciated. Thanks in advance. Kusuma. Why do you want to do this? An exam is to show proof of your existing knowledge of a particular subject. If you simply brushed over something as complex as C++, took an exam and (somehow) passed it, what value is there in that? I assume you are wanting the exam for employment purposes. If that is correct, do ...

How to convert Delphi Record to C#?
There is an old program that I'm rewriting. The program stores the data into an array and dumps it to a file. I can't seem to properly load the file though. Here is the record I'm working with: type TMyJob = record ReceiveDate: string[10]; JobName: string[150]; Contractor: string[100]; AssignDate: string[10]; DetailerName: string[30]; end; Jobs: array of TMyJob; Does anyone know how to convert this? "Magus" <mr.magus@gmail.com> wrote in message news:c234d4d2-221a-4389-802c-a1eaada8791c@v20g2000yqv.googlegroups.com... &...

Function address from VB?
Great day. I have a question. I'm trying to find out in VB from which cell my formula was called. For example I have a user defined formula public function MyFormula() MyFormula = 10 end function if somebody calls this function from sheet1 cell A1 (b "=MyFunction()"). Is there a way for me to find out that in VB? Thank you -- Message posted from http://www.ExcelForum.com Application.Caller.Address will give you the address that called th function. -- Message posted from http://www.ExcelForum.com kkknie, Thank you!!!! This works great!! -- Message posted from h...

decrease C:\exchsrvr\imcdata\out\archive ???
C:\exchsrvr\imcdata\out\archive Is there anything I can do to make the size of this folder to decrease? Right now, its at 10GB. Using Exchange 5.5. C drive free space is getting awefully tight... Please help... Chris H If you don't need the files, for archiving or diagnostic purposes, you can remove the files. If you do need them, then you may want to back them up before you remove them and store that backup tape separately and write protect it. Removing the files is a pretty straight-forward process. You will need to stop the IMS first... and you will likely not want to enu...

I check "windows in task bar", after restarting, it is no longer c
In Excel if I check "windows in task bar", (Tools, Opions, View Tab) after I have restarted the machine this option is now unchecked. I have unchecked "Group Similar Task Bar Buttons" in my Task Bar Properties What version of excel are you running? There's a bug in xl2k that shows up if you're working with shared workbooks. If you're not using xl2k and shared workbooks, it sounds like you don't have permission to save this setting in your windows registry. I'd talk to my IT folks to find out if they can fix it. but.... Saved from a previous post....

How do I define column C so C(n) =A(n)+B(n)
I want to create a spreadsheet where some cell entries are mathematical functions of data in corresponding cells (same row) of other columns. For example, assume fixed data in columns A and B. In column C, I want C(1) to = A(1) + B(1) etc. Hi in C1 type =A1+B1 then move your cursor over the bottom right hand corner until you see a + (known as the autofill handle) hold the left mouse down and drag down the column as far as you need to go and let go, the formula will be filled in for you for each line Cheers julieD "S M Raucher" <S M Raucher@discussions.microsoft.com>...