Computer Graphics

Moderators: Sephiroth
Number of threads: 1263
Number of posts: 2665

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: Best language for PostScript output Posted by Sephiroth on 30 Mar 2009 at 8:26 AM
I use Visual Studio 2005 Pro. I normally only install the C and VB components however, and have only used VB once. I love C++ but my programming history evolved from Atari Basic/Atari ASM to QuickBasic in DOS, then to C in Win9X, and finally C++ in XP. C++ is much better than C, but it is also a tad more complicated to learn. If you're up to it though, C++ is what I would whole-heartedly recommend to any aspiring programmer. I also never recommend VB, C#, or the .NET platform to people since it limits their code to Windows. I believe in hitting the larger audience, including Mac and Linux users. No, I don't personally use a Mac, but I use Linux for everything except gaming!

In C++ there isn't a "subroutine" like in Basic. Each class has various functions, which are referred to as "methods". Overloading involves naming to methods identical to each other, but passing different parameters and/or returning a different variable type. Example below.
class TestObject
{
public:
  TestObject(); //Default constructor
  TestObject(wchar_t*); //Parameterized constructor
  virtual ~TestObject(); //Class destructor

protected:
  void MyName(wchar_t*); //Pass a pointer to a string and store it
  wchar_t* MyName(); //This method would then return the string

private:
  wchar_t *pName;
};

Assuming you wrote code for those methods, you would write two for the "MyName" method. One would return nothing and accept a pointer to a string of UNICODE characters and set the internal (private) "pName" pointer to that string. The other method would return a pointer to said string. They both have the same name, but return different values and accept different parameters.

One final thing to note is that ANSI is dead. If you're going to pick up Windows programming and C++, I would recommend you learn to do it in UNICODE. UNICODE is much better than ANSI and allows you to do so much more with your code, as well as reach people who may use a different character-set than you. Let me know if you have any questions about it.

-Sephiroth
Thread Tree
chartguy Best language for PostScript output on 25 Mar 2009 at 2:03 PM
Sephiroth Re: Best language for PostScript output on 25 Mar 2009 at 9:37 PM
chartguy Re: Best language for PostScript output on 25 Mar 2009 at 10:43 PM
Sephiroth Re: Best language for PostScript output on 30 Mar 2009 at 8:26 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.