I need to decide

This is a discussion on I need to decide within the C++ Programming forums, part of the General Programming Boards category; Hey guys. I'm guess im just at the end of the beginer's fase of C++ and I'm sort of frustrated. ...

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    40

    Question I need to decide

    Hey guys. I'm guess im just at the end of the beginer's fase of C++ and I'm sort of frustrated. Mainly because I just don't ever see C++ being able to do what I want it to do in the distant fututre for example a program that can connect to an online server and exchange information.

    I was looking at maybe converting to another language that will give me this possibility but I have no idea what I should change to. I've been to alot of web sites and they never seem to tell me what I wan't to know. Can you give me a pointer in the right language or if C++ does cater for my needs. I was thinking of java but I'm not very sure.

  2. #2
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    C++ does allow you to do that. You need to use 'sockets' in order to do networking. How exactly to do that varies on your OS - so let us know what you're using and we'll point you in the right direction.

  3. #3
    Registered User
    Join Date
    Sep 2004
    Posts
    40
    I'm running Windows XP and on the side is it possible to use the Windows standard GUI?

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    The Windows library for dealing with network connections is called Winsock.

    Here's a very popular tutorial that focuses on Unix sockets - but the concepts are the same:
    http://www.ecst.csuchico.edu/~beej/guide/net/

    Here's a tutorial that'll show you the basics of using Winsock. It uses C and the Win32 API, so you may not like this one:
    http://www.hal-pc.org/~johnnie2/winsock.html

    Google's got a million of them. Just search until you find one that suits you. Now that you know the technical term for what you're looking for, it should be a lot easier to find.

    edit: If you want to use the Windows Standard GUI in your applications, you'll need to learn either the Win32 API, or a wrapper like MFC. If you want to learn another language, C# makes working with GUIs VERY easy.

  5. #5
    Registered User
    Join Date
    Sep 2004
    Posts
    40
    Another question. What exactly i C#? How does it differ from C++. I'm gussing not much but is it better or worse?

  6. #6
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    C# is actually more similar to Java than C or C++. Simply put, it's the language specifically designed for the .NET framework, and it uses a C-style syntax.

    The .NET framework is Microsoft's implementation of a specification for a new idea. Every Operating System would enable itself to understand a common language, and then programs could run on any OS. Specifically, programmers would write .NET program, compile them half way, in this common language, and then when that program was run on the target machine, it was compiled the rest of the way.

    Several languages have been ported to .NET including C++ and Visual Basic, but C# was designed specifically for it. The reason I recommend it is because of how coder-friendly the libraries are. I could show you a long complicated C# program, and you would have no problem understanding it, because the syntax is designed to make sense in the way that we think of things. Instead of having variables like "char *ptr" and getting user input with something like "scanf()" (a C function), you can use things like a TextBox, and you would use the CreateTextBox() function to place it somewhere in your window. Try it out, see how you like it.

  7. #7
    Registered User
    Join Date
    Sep 2004
    Posts
    40
    thank you so much. I've never met someone more helpful before. I will try out C# and I hope it will be the language I've been searching for. Thank you

  8. #8
    Registered User
    Join Date
    Sep 2004
    Posts
    40
    Damn. C# is certainly what I want but thats alot of downloading for a personl ike me with dial-up. Is there a way around this massive download? Also just for curiosity, if somehow I manage to get everything I need can I make programs with it that work with people who don't have the .net framework?

  9. #9
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    No, people need to have the .NET framework or something similar (Mono is availble for *nix systems - it's free). I don't think it's as big a problem as you think. Most new Windows distros have it installed, and you can redistribute the framework, I believe (it's been a long time, so I apologize for being a little rusty here).

    If you download the .NET SDK - that is a mighty big download! There are other .NET compilers out there (Borland, for example), but I don't recommend those. You may just want to get a download manager like GetRight and leave it on over night a couple of times. What I use is Visual Studio.NET - which is awesome, and it contains everything you need in a neat, easy-to-use visual environment. It's quite expensive, but most people get lucky with a free version by going to Microsoft advertizing seminars.

  10. #10
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Hi,

    I've never used C#, but I was curious about how much harder than C++ it was, I assumed it was since I thought it went C, C++, and then C# for the really smart people. So, I picked up a beginning C# book in the bookstore, and after reading a little bit, I suddenly realized that C# was designed to be easier than C++, much easier. In essence, it is just like Java, and it is Microsoft's attempt to wipe Java off the face of the earth. C# programs are compiled into another type of code that will run on any .NET enabled computer. In addition, there are other languages, like ASP.NET and VB.NET that also get compiled into that same type of code, so supposedly you can write portions of programs in different languages, compile them, and then combine the compiled code into one program.

    If that sounds at all familiar, that is a lot like Java. Java is compiled into a code that in theory is supposed to be able to run on any computer. To run the Java code, each different type of computer has to install a unique Java interpreter that can read the code in a way that will make it work on that system.

    Anyway, Java and the different .NET languages: C#, ASP.NET, and VB.NET are supposed to be very good for integrating applications with the internet, so one of those languages is probably what you are looking for. I thought I might try to learn C#, but I am using win98, and you can't develop .NET programs with win98. Another difference between C# and Java is that Java is all free. So, I went with Java. However, I'm quickly learning that while Java is easier than C++ in a lot of ways, it is such a huge, vast language that it is overwhelming.
    Last edited by 7stud; 04-04-2005 at 03:26 AM.

  11. #11
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by sean_mackrory
    C++ does allow you to do that. You need to use 'sockets' in order to do networking. How exactly to do that varies on your OS - so let us know what you're using and we'll point you in the right direction.
    What?! C++ doesn't allow client-server programs?!

    It's not April 1st any more you know.

    Quzah.
    Hope is the first step on the road to disappointment.

  12. #12
    Registered User
    Join Date
    Sep 2004
    Posts
    40
    Thanks everyone. I found a nice and absolutly free download manager at www.freshdevices.com I recommend it because it is so easy to use and it can be set to automatically come up instead of the normal windows download box so you don't need to type in a link. It sped up my downloads a bit and now I can learn C#. I've had a look and I would say it is the best language I've ever come across mainly because its so easy and its based on the .net framework. You guys have been a great help and you will find me in the C# forums from now on.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 06-04-2008, 05:57 PM
  2. Replies: 4
    Last Post: 09-02-2007, 08:47 PM
  3. please help me decide between computer science or information system
    By FifthEdition in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-07-2004, 05:19 PM
  4. How will you decide (Good/Right - Bad/Wrong)?
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 10-14-2002, 12:26 PM
  5. How to decide if four lines form a square?
    By Koedoe in forum C++ Programming
    Replies: 6
    Last Post: 10-01-2002, 10:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21