Jump to content

  • Log In with Google      Sign In   
  • Create Account

nitishk

Member Since 09 Aug 2011
Offline Last Active Feb 23 2014 11:49 AM

Posts I've Made

In Topic: C/C++ Refresher

08 July 2013 - 08:08 PM

 

I'm curious about the part where you mentioned that programs that run in the background don't need a graphics API. What would I need for such a program? Just a simple program running in the system tray.

 

Programs running in the system tray need to use Win32 or a library like Qt.

 

Programs that don't require any visuals serve many purposes. If you're on a Windows operating system, do Ctrl+Shift+Esc and switch over to the 'Processes' and 'Services' tab. How many of those programs do you see actually visible on-screen? smile.png

 

Many programs you can run from the command line, and some are very powerful. Microsoft, Linux, and Mac all have many programs built in that don't have any interface. ImageMagick is a famous one (downloadable) that lets you manipulate image files in-bulk. Many webservers have it pre-installed, but I use it on rare occasions on my Windows machine.

 

Here's another example of one: Open a command prompt (Start -> Run -> cmd.exe), and type in 'ping www.google.com' to have your computer send a network packet to Google's webservers, and measure the amount of time it takes to go there and back. 'ping' is a program built into almost every operating system. Non-visual tools like these often do one thing, and do it well, and people chain the output and input of multiple "command-line" programs to run complex tasks on bulk files. Some can be dangerous to use, though, if you accidentally ask them to delete files you didn't want deleted - I almost did that the other day. happy.png

 

Game-wise, these kinds of programs don't serve much purpose... but game servers don't have visual interfaces, and so don't need graphics APIs (They all use other kinds of APIs, though - like the built-in networking APIs most machines have, or file-access APIs, or etc...).

 

Oh i understand now, I thought you meant they could be made with the standard C++ libraries which is what confused me haha. I figured I'd need some sort of API for it anyway.

 

Thank you very much for the helpful information, I know what I need to do now :D


In Topic: C/C++ Refresher

08 July 2013 - 06:25 PM

 

Would it be better to use the Microsoft wrapper API? What is that called and how does it differ from third-party ones such as QT?

The advantages of third party ones is that the code works on Windows, Mac, and Linux, and sometimes other platforms like Android, iPhone (with additional work required), instead of just working on Windows machines. Oftentimes, they're better designed than Win32 also (IMO), because Win32 has to remain backwards compatible with almost two decades of features that are deprecated, and also has to work across many different languages and so can't take advantage of certain language features. Other Microsoft APIs like DirectX do alot better, because each DirectX version has the freedom redesign itself from scratch.

 

The more modern Microsoft APIs I don't have experience with, mostly because they either use different languages (like C#) or they require you to use Microsoft's tools, or they require non-standard dependencies on Microsoft Runtimes (like .NET). Maybe someone with experience with them can comment.

I'm a huge Microsoft fan (love Microsoft Excel and Win7), but I don't like working with the Microsoft libraries I've interacted with so far - though I admittedly haven't tried too many.

 

But really, your API depends on your goals. If you're wanting to make games, consider SDL 2.0 or SFML 2.0 for 2D hardware-accelerated graphics, and input and sound.

If you want to make cross-platform desktop applications, I'd re-recommend Qt. If you're wanting to make services that run without anything visible onscreen, then pure C++ would work without a graphics API.
 

I made 2 games (Pong and Pacman) in C only but I learned C++ shortly after and started remaking my Pong using C++ and OOP, didn't finish the game but I'd say I was fairly sufficient in C++. I would like to continue with C++ but I was unsure which would be more relevant to Windows programming.


C++ is a very huge language that takes several years to master. By all means continue to explore it! But when it comes to C++, it's often better to underestimate than to overestimate your capabilities. Or maybe I'm just misunderestimating your capabilities for you. laugh.png The book I mentioned won't teach you all of C++ (no single book can), only C++'s standard library.

You'll probably want to bookmark cplusplus.com, cppreference.com, and the notable C++ FAQ as go-to sources for information.

 

Thanks for the detailed explanation! I think I will look into Qt and maybe some other 3rd party API for now because I do plan on releasing it for other platforms as well and the backwards compatibility seems like an unnecessary disadvantage I can overcome by simply using a more modern API.

 

I've started reading on cplusplus.com already so for now I think I'll just get myself up to speed on C++11 and then start my application development.

 

I'm curious about the part where you mentioned that programs that run in the background don't need a graphics API. What would I need for such a program? Just a simple program running in the system tray.

In Topic: C/C++ Refresher

08 July 2013 - 05:49 PM

How about picking up a reference guide to the latest C++ standard? (C++11)

Not only would you be reminded about how C++ looks, but you'll also be brought up to date on all the new features.

 

I haven't personally read it, but this book is an often recommended read.

 

As for Windows programming, people don't usually directly program with Win32 anymore. Usually they use a wrapper API - either from Microsoft, or a third-party one.

I recommend Qt as a great API.

 

You also mentioned that you made 'C' games in the past, but then repeatedly say C/C++. C++ is a very distinct language from C. Have you already learned C++ in the past?

That book looks exactly like something I am looking for, I will look into it for sure!

 

Would it be better to use the Microsoft wrapper API? What is that called and how does it differ from third-party ones such as QT? I would prefer to stick with the official one by Microsoft unless there are specific advantages to using a third-party API.

 

I made 2 games (Pong and Pacman) in C only but I learned C++ shortly after and started remaking my Pong using C++ and OOP, didn't finish the game but I'd say I was fairly sufficient in C++. I would like to continue with C++ but I was unsure which would be more relevant to Windows programming.


In Topic: Ordering strings

29 April 2013 - 12:28 PM

Thanks for the java collections link! It worked :D

 

Thanks for the help :D


In Topic: Ordering strings

29 April 2013 - 07:13 AM

The array of students is created elsewhere and each student contains firstname, lastname, grade, age, email. I would like to list by first name but then have the appropriate lastname, grade etc with that first name. So if i have student[0] and it contains 'b' for every field and i have student[1] and it contains 'a' for every field i would like to have output:

 

a a a a a

b b b b b


PARTNERS