Programing
May 20 2008, 11:48 pm
By: Brontobyte
Pages: < 1 2 3 47 >
 

May 21 2008, 1:08 am Heimdal Post #21



That's a good link. If you're creating a new project in VS, be sure to follow steps 3 through 6 from here:
http://www.dreamincode.net/forums/showtopic49569.htm

Farty: if you're using the convenience of the .NET library, you have to expect to pay the price of requiring dependency on it. There's also a hidden benefit here, which is that many programs can share the same DLL. If you're not using the .NET library, you don't have to require that dependency, but you have to know how to set up your project to do that.



None.

May 21 2008, 1:18 am O)FaRTy1billion[MM] Post #22

👻 👾 👽 💪

I don't use it, I'm talking about stuff I got elsewhere. And is VS8 == .NET?
I just hate runtimes. They should die.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 21 2008, 1:25 am Falkoner Post #23



Start with C/C++(they're basically the same thing) all the most powerful languages are based off of it, so they are easier to learn once you learn C.

If you're teaching yourself, the internet is the same, if not better than books, and I would also study on math, since it helps with programming.



None.

May 21 2008, 1:27 am Brontobyte Post #24



Quote from Falkoner
Start with C/C++(they're basically the same thing) all the most powerful languages are based off of it, so they are easier to learn once you learn C.

If you're teaching yourself, the internet is the same, if not better than books, and I would also study on math, since it helps with programming.

To what degree? Adding and subtracting or actual logic? If then, Or, And, statements?



None.

May 21 2008, 1:29 am Centreri Post #25

Relatively ancient and inactive

Math helps you think around corners. If/then/or/and are pretty self-explanatory, no math required. If your school/whatever offers a computer science course, take it, since that also helps you think around corners. If it's the right course.

Other then that, it's just syntax memorization.

I've had programming books, and no matter what anyone says, I've found them more comprehensible and helpful then the internet, though the internet is the best reference around for any programming language. I'd buy a book and see which way you learn better.



None.

May 21 2008, 1:32 am Brontobyte Post #26



Ok, some more questions:

Do I have to remember all of the syntax, or does it fill it in as I type?

Dose spacing matter?

Caps matter?

This is some code on the one tutorial websites.

Quote
// initializing C++
#include <iostream>
using namespace std;

// declaring function prototypes
float addition (float a, float b);

//main function
int main ()
{
float x; //
float y; //declares variables
float n; //
int b;
b = 1; //sets value of b to 1
cout << "Simple Addition Calc- First Program"; //displays info about program
while (b==1) //creates loop so the program runs as long as the person wants to add numbers
{
//following code prompts the user for 2 numbers to add and calls function addition to display results
cout << "\n" << "Type a number to add (can also use negetive, decimals, etc.): ";
cin >> x;
cout << " Second number: ";
cin >> y;
n = addition (x,y);
cout << "Ans: " << x << " + " << y << " = " << n << "\n";
//following code sets b to the value the user imputs to determine if the loop is broken to end the program
cout << "Solve another operation? (1=yes, 2=no): ";
cin >> b;
cout << "\n";
if (b==2)
cout << "Terminating application.";
}
//ends the main function of the code
return 0;
}
//following function adds the numbers
float addition (float a, float b)
{
float c;
c = a+b;
return (c);
}
//END C++ CODE




None.

May 21 2008, 1:34 am Centreri Post #27

Relatively ancient and inactive

I don't actually have C experience, but from what I gather it's similar to PHP, so I'll answer anyway:
Memorize the syntax anyway, even if it helps you fill it in. You should be able to write what you want in notepad.
In almost all cases, spacing doesn't matter.
Caps probably matter. You can google it, but I'm pretty certain this family of languages is entirely reliant on caps. IE variable WoW != variable wOw.



None.

May 21 2008, 1:40 am Brontobyte Post #28



How do I make 3d buttons like in a web browser? When you hover over them there change color and when you click they depress. Is this just code or do I need to "draw" it out somewhere?

This goes double for the entire window. I saw most of FaRTy's programs. Nice stuff, but the Command Prompt box has to go. How would I create a custom window where I can choose where buttons are, what hot keys ( ctr + o = Open File / ctr + s = Save File ect... ) do and everything else? Am I getting ahead of myself? Is this stuff even too complex for a beginner to learn.

Note: FaRTY's Programs ROX MEH SOX! :bleh:



None.

May 21 2008, 1:41 am Centreri Post #29

Relatively ancient and inactive

Yeah.. I think you're getting ahead of yourself. GUI comes later. Make things run in CMD first.



None.

May 21 2008, 1:43 am Brontobyte Post #30



Quote from Centreri
Yeah.. I think you're getting ahead of yourself. GUI comes later. Make things run in CMD first.

I was afraid you were going to say that. What about his menus in StarCraft Downgrader? He has a specific amount of space for the menus and options ect... or is this also Graphics User Interface related?



None.

May 21 2008, 1:49 am DT_Battlekruser Post #31



Definitely getting ahead of yourself. If you learn GUI for real, you're going to have to probably end up manually positioning everything on the window, which gets to be quite a bitch when it comes to font metrics and such. Start with programs that execute from the command line, as they are simplest. To be really simple, start with programs that don't really 'do' anything -- meaning they require no user input.

To answer a few questions..

Do I have to remember all of the syntax, or does it fill it in as I type?
It depends on your IDE (Interactive Development Environment). Most modern IDEs contain an autocomplete feature to speed up your programming. I tend to rely on this rather than memorizing every method in the API and also to catch my syntax errors (sort of like I rely on spell check to stop me from typing messily). You can write any real language using any text editor, and you should certainly know basic control syntax and library methods from memory.

Dows spacing matter?
No. In all standard languages, the compiler will ignore any and all extra spaces and linebreaks. You still need to separate words with at least one space. Note that a few rare exceptions, such as the Python programming language, will parse line breaks and tabs as part of the syntax.

Caps matter?
Yes, pretty much all compilers are case-sensitive.


It's clearly a little late, but my personal suggestion for a language would have been Java. Much more than C++ it forces you to code in an organized style, and provides a much better introduction to object-oriented programming than any other language. Java is taking over as the language of choice for many lower-level and even higher-quality college-level computer science courses (for example, it is Carnegie Mellon's biggest undergraduate language), as well as being the one and only standard for the Advanced Placement exam in Computer Science.

Almost all the tenets of syntax and style transfer easily between languages, however, so whatever you start with should prepare you well for other languages.




None.

May 21 2008, 1:52 am Falkoner Post #32



If you are going to use a MS compiler, DON'T use 2008! Get older ones, like 6.0, they really get screwy in the newest versions, like removing the .h when including header files..



None.

May 21 2008, 1:57 am Brontobyte Post #33



Too late for that. I have already downloaded everything I need, and I am just waiting for the damn thing to install before 10pm <-isn't going to happen :( I will post more questions tomorrow or as needed. Thanks for the help. :-)



None.

May 21 2008, 2:31 am O)FaRTy1billion[MM] Post #34

👻 👾 👽 💪

Quote from Brontobyte
This goes double for the entire window. I saw most of FaRTy's programs. Nice stuff, but the Command Prompt box has to go. How would I create a custom window where I can choose where buttons are, what hot keys ( ctr + o = Open File / ctr + s = Save File ect... ) do and everything else? Am I getting ahead of myself? Is this stuff even too complex for a beginner to learn.
That was only two of them. xC

If you ask nicely I'll let you see sourcecode for something like MapStats. It's basically all printf, though. :P
It'd be good for learning variables, I guess.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 21 2008, 11:00 am Brontobyte Post #35



So what is the basic starting template?



None.

May 21 2008, 12:13 pm fatimid08 Post #36



Quote
Which one should I select?
Don't select any of those, you don't need them. Then click next, it'll download and install VS C++ Express 2008 for you.

The cplusplus.com tutorial is pretty good I think, so it would be a good idea to start there.

When you start out, I suggest you pick empty project as project template, it'll make your life easier until you get better. Then you can go on to more specific templates, although I don't recommend doing CLR or Windows Forms projects in C++ at all (MS modified C++ a bit to work with .Net, and it's not pretty at all and very confusing).



None.

May 21 2008, 4:56 pm Heimdal Post #37



Quote from Falkoner
If you are going to use a MS compiler, DON'T use 2008! Get older ones, like 6.0, they really get screwy in the newest versions, like removing the .h when including header files..
VS 6.0 BLOWS. The for-loop scope problem makes writing any kind of portable code impossible. By "removing the .h" do you mean for the standard library files? It's supposed to be like that. Intellisense has improved drastically with each new version of Visual Studio.

BrontoByte: learning GUI (windows, buttons, etc) programming and learning the basics of programming are two very different things, unfortunately. If you're interested in a career in computer science then you need to learn the fundamentals. If you just want to create some cool programs, then it's not actually that hard to just jump into GUI development. But if that's what you want, I'd recommend using C# and windows forms 2.0 - not C++ and definitely not raw Win32 API.

Post has been edited 1 time(s), last time on May 21 2008, 5:02 pm by Heimdal.



None.

May 21 2008, 7:44 pm KilaByte Post #38



To start, you should first spend 4 days writing an amazing storyline to an MMORPG. Then program the MMORPG.

MMORPGs are the easiest to make.
(Turn on your sarcasm detectors.)

Seriously though, definantly start with small programs. Also, I wouldn't start with C++ if I were you. IMHO it would be better to start with Java, Java is more strict in coding and helps you to build better habits. Bad habits can easily be formed when you start with C++. Remeber to comment all your code so you can go back to it later and understand what it all means. (Yes, its very easy to get lost in your own code with bad habits/documentation)

There are many books on programming, I recommend picking one up and starting there. Some of them even come with Free SDK's, Compilers, or IDE's.



None.

May 21 2008, 8:35 pm fatimid08 Post #39



C++ is good for understanding fundamental concepts, while Java really isn't (VB, C#, etc also aren't I find). Getting bad habits in Java isn't really harder than getting bad habits in C++, but often, they aren't the same kind of bad habits. On top of that, Sun Java is horribly slow and annoying.



None.

May 21 2008, 8:43 pm O)FaRTy1billion[MM] Post #40

👻 👾 👽 💪

Quote from KilaByte
Remeber to comment all your code so you can go back to it later and understand what it all means. (Yes, its very easy to get lost in your own code with bad habits/documentation)
I still don't understand that... I've never gotten lost in my own code, even when it was ASM and everything looks the same.

Also, apparently, the things I do are not good... so you could try the opposite. That may be worse, though. xP



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Options
Pages: < 1 2 3 47 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[03:36 pm]
NudeRaider -- :lol:
[03:02 am]
Ultraviolet -- I'm gonna send inf to have sex with their moms
[03:02 am]
Ultraviolet -- fuck those motherfuckers
[2024-5-15. : 11:02 pm]
NudeRaider -- PSA: ASUS apparently decided their RMA department needs to "become profitable" and for a while now outright tries to scam customers. They were called out on it a year ago, promised to change, but didn't. https://www.youtube.com/watch?v=7pMrssIrKcY so my recommendation: Stop buying ASUS, and if you already have and need something RMA'd, make sure to not let them bully you into paying.
[2024-5-15. : 3:08 pm]
Oh_Man -- example of wat u mean?
Please log in to shout.


Members Online: jjf28, 4jordane39100re3, 9giannac57100fN6, Roy