|
You last visited: Today at 05:58
Advertisement
C++ or C#?
Discussion on C++ or C#? within the SRO Coding Corner forum part of the Silkroad Online category.
10/25/2010, 16:06
|
#16
|
elite*gold: 0
Join Date: Nov 2007
Posts: 959
Received Thanks: 602
|
for start c# is better,I think.its easier,etc..but for getting a job and creating games,c++ is absolutely the best...  I'm learning c# atm,if I know it on a pr0 level then I'll learn c++ aswell.
greetings,vorosmihaly
|
|
|
11/03/2010, 17:46
|
#17
|
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
|
Quote:
Originally Posted by vpegas1234
Hello guys
so im learning c++, but i think i dont go anywhere with it..
What you guys think that is better for the future(getting a job, making games etc)?
|
well the basic commands are everywhere nearly the same.
first of all you should learn the basics of a good programming-style
(e.g. object-oriented programming). it doesn't matter if you start doing this with c# or c++.
if you want to create window form applications you should start with visual c# because it has a good form designer which may be useful at the beginning.
otherwise you could start right away with c++.
if you want to study informatics later you HAVE to create programs with c++.
|
|
|
11/03/2010, 17:50
|
#18
|
elite*gold: 20
Join Date: Mar 2007
Posts: 4,277
Received Thanks: 2,990
|
Both. Poly is never worse than Mono.
|
|
|
11/03/2010, 18:11
|
#19
|
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
|
Quote:
Originally Posted by InvincibleNoOB
Both. Poly is never worse than Mono.
|
Well, he asked for one:
Quote:
Originally Posted by vpegas1234
What you guys think that is better for the future(getting a job, making games etc)?
|
Also, why are you encouraging necroposting? ZeraPain necroposted this thread and you just do the same.
Is that appropriate behaviour for a moderator? (even if the thread is only dead for 8 days)
#Reported: Necroposting.
|
|
|
11/03/2010, 19:45
|
#20
|
elite*gold: 41
Join Date: Nov 2007
Posts: 3,385
Received Thanks: 2,700
|
You can't call a week necro.
@Invi
If I'd tell my girlfriend about that, she'd kill me ;O.
Well jokes aside for now. Both are great high level languages although C++ is simply more secure and powerful. C# isn't really hard to learn and gives you a great overview , if you feel quite safe with your coding skills in C# just move to C++. Both are used in the IT business. Trying to learn both at once would be a fail imho, because you can not really get yourself in.
Feel free to decide for yourself
|
|
|
11/12/2010, 19:13
|
#21
|
elite*gold: 0
Join Date: Mar 2008
Posts: 556
Received Thanks: 545
|
C++; or just learn all of the coding of Microsoft languages, they are really similar, just C++ is the most advance in my opinion. C# is good as well, I love C#.
|
|
|
11/12/2010, 20:49
|
#22
|
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
|
Quote:
Originally Posted by Murgen
C++; or just learn all of the coding of Microsoft languages, they are really similar, just C++ is the most advance in my opinion. C# is good as well, I love C#.
|
Sorry, but this kinda proves you don't know what you are talking about.
Try to compare C# to Visual Basic (old versions, VB6 for example), it's totally different!
If you mean .Net languages, it's still wrong, VB.Net and C# are nothing alike.
Also, Microsoft languages is a very general topic, Foxpro is a Microsoft programming language too.
|
|
|
11/12/2010, 22:04
|
#23
|
elite*gold: 0
Join Date: Mar 2008
Posts: 556
Received Thanks: 545
|
Quote:
Originally Posted by lesderid
Sorry, but this kinda proves you don't know what you are talking about.
Try to compare C# to Visual Basic (old versions, VB6 for example), it's totally different!
If you mean .Net languages, it's still wrong, VB.Net and C# are nothing alike.
Also, Microsoft languages is a very general topic, Foxpro is a Microsoft programming language too.
|
I am talking about 2008 versions in general, and I know they are different, I am saying that they have similarities, and very similar looks. And you can easily convert a lot of VB .NET codes to C# in the 2008 edition.
Code:
01 Public Class Form1
02
03 Private Sub btnCalculateBill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculateBill.Click
04
05 'Declare Variables
06
07 Dim bgnOdo As String = Me.txtBeginOdometer.Text
08 Dim endOdo As String = Me.txtEndOdometer.Text
09 Dim numDayRent As String = Me.txtNumDayRent.Text
10 Dim numOfMiles As Decimal = 0
11 Const mileChrgB As Decimal = 0.12 '$0.12 for business
12 Const mileChrgP As Decimal = 0.1 '$0.10 for personal
13 Const rentalChrgB As Decimal = 15.0 '$15.00 for business
14 Const rentalChrgP As Decimal = 12.5 '$12.50 for personal
15 Dim totMileChrg As Decimal = 0
16 Dim totRentalChrg As Decimal = 0
17 Dim totDue As Decimal = 0
18
19 numOfMiles = endOdo - bgnOdo
20
21 Do While Me.radPersonal.Checked = True
22 Me.radBusiness.Checked = True
23 Me.radPersonal.Checked = False
24 Loop
25
26
27 If Me.radBusiness.Checked Then 'Business Customer
28 totMileChrg = mileChrgB * numOfMiles
29 totRentalChrg = numDayRent * rentalChrgB
30 totDue = totMileChrg + totRentalChrg
31 End If
32
33 If Me.radPersonal.Checked Then 'Personal Customer
34 totMileChrg = mileChrgP * numOfMiles
35 totRentalChrg = numDayRent * rentalChrgP
36 totDue = totMileChrg + totRentalChrg
37 End If
38
39 Me.lblAmtOfMiles.Text = Format(numOfMiles, "General Number")
40 Me.lblAmtOfMileChrg.Text = Format(totMileChrg, "Currency")
41 Me.lblAmtDayUseChrg.Text = Format(totRentalChrg, "Currency")
42 Me.lblTotDueDisplay.Text = Format(totDue, "Currency")
43
44 End Sub
Play around with that, see if its hard for you to convert it to C#.
|
|
|
11/13/2010, 08:20
|
#24
|
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
|
Quote:
Originally Posted by Murgen
I am talking about 2008 versions in general, and I know they are different, I am saying that they have similarities, and very similar looks. And you can easily convert a lot of VB .NET codes to C# in the 2008 edition.
Code:
01 Public Class Form1
02
03 Private Sub btnCalculateBill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculateBill.Click
04
05 'Declare Variables
06
07 Dim bgnOdo As String = Me.txtBeginOdometer.Text
08 Dim endOdo As String = Me.txtEndOdometer.Text
09 Dim numDayRent As String = Me.txtNumDayRent.Text
10 Dim numOfMiles As Decimal = 0
11 Const mileChrgB As Decimal = 0.12 '$0.12 for business
12 Const mileChrgP As Decimal = 0.1 '$0.10 for personal
13 Const rentalChrgB As Decimal = 15.0 '$15.00 for business
14 Const rentalChrgP As Decimal = 12.5 '$12.50 for personal
15 Dim totMileChrg As Decimal = 0
16 Dim totRentalChrg As Decimal = 0
17 Dim totDue As Decimal = 0
18
19 numOfMiles = endOdo - bgnOdo
20
21 Do While Me.radPersonal.Checked = True
22 Me.radBusiness.Checked = True
23 Me.radPersonal.Checked = False
24 Loop
25
26
27 If Me.radBusiness.Checked Then 'Business Customer
28 totMileChrg = mileChrgB * numOfMiles
29 totRentalChrg = numDayRent * rentalChrgB
30 totDue = totMileChrg + totRentalChrg
31 End If
32
33 If Me.radPersonal.Checked Then 'Personal Customer
34 totMileChrg = mileChrgP * numOfMiles
35 totRentalChrg = numDayRent * rentalChrgP
36 totDue = totMileChrg + totRentalChrg
37 End If
38
39 Me.lblAmtOfMiles.Text = Format(numOfMiles, "General Number")
40 Me.lblAmtOfMileChrg.Text = Format(totMileChrg, "Currency")
41 Me.lblAmtDayUseChrg.Text = Format(totRentalChrg, "Currency")
42 Me.lblTotDueDisplay.Text = Format(totDue, "Currency")
43
44 End Sub
Play around with that, see if its hard for you to convert it to C#.
|
Ofc this is easy, but it's not a difficult function.
|
|
|
All times are GMT +1. The time now is 05:59.
|
|