Digital Paint Discussion Board
Development => General Development => Topic started by: Garrett on October 27, 2007, 11:19:54 AM
-
What is the standard dialect of C and C++? What dialect does DP use? Would anyone be able to show me a standard C and C++ Tutorial because most of the things I found on Google were just garbage.
-
Hello Garrett, Google worked nice for me...
http://www.cplusplus.com/doc/tutorial/ ;)
lol oh well.
Also, by dialect i think you mean syntax, and the syntax of c++ is the syntax of c++, no other way to say it.
And DP was coded in C using the VC++ compiler.
-Cusoman
-
The tutorial i had started reading was used with Unix.
-
How much of a difference are there between a UNIX dialect and the standard dialect.
-
ummm, unix is an operating system. ;D similar to linux. so if you learned how code in c++ on a linux based system, the application would not run on windows. Thats why in the paintball 2 source there is the windows version to compile, and the linux version to compile. u can compile linux-based, or in this case unix-based applications on windows, just not run them. they use different syntax.
-Cusoman
-
java ftw
-
Java doesn't have different syntax right? It ports to different a different OS easily? So if I would want to write any type of program in C / C++ for the windows OS, I should learn the standard version correct?
-
They do not use different syntax. They use different libraries and some different means of doing things. But, C++ is C++. If they used different syntax, then they would not be the same language.
-
The different libraries correspond with the OS then?
-
Garrett, these dialects you speak of are with regards to the different C++ compilers. But they should all support the standard C++ functions so you don't even need to worry about this if you're just starting out. Forget about it until you get the basics down ok?
Or better yet learn Java and clear your mind of different OS support :D
-
Haha. Thanks for the help. I'm learning Java in school in 3 months so I'll be taking your advise.
-
Java is evil. If you want to write applications that can easily compile and run on multiple operating systems, just use something like SDL.
-
Java is the devil Bobby Boucher.
:D
-
Just to polish this off, In general all major C++ compilers these days have at least 99% compliance with the ISO standard for C++. The major differences come when you go to use things like sockets(wsa_2 on windows, sockets on unix/linux/mac/bsd/etc), and even then they are very similar in use..
Forget about it until you get the basics down ok?
Good advice :)
Or better yet learn Java and clear your mind of different OS support :D
Bad advice :(
-
Bad advice :(
Depends.
-
Depends.
It seriously does. If you've got several people working on a project and you need a quick and dirty tool, Java can be the best route to go.
-
It seriously does. If you've got several people working on a project and you need a quick and dirty tool, Java can be the best route to go.
:o Java is worth of a better example than that.
-
I didn't say Java was a dirty tool... I've never made a web service with Java, just .NET, I just feel that even C and/or C++ purists can use Java in a practical fashion, regardless of their capacity or need. It seems like even when I agree with you these days you have to refute :P
-
It seriously does. If you've got several people working on a project and you need a quick and dirty tool, Java can be the best route to go.
It depends on what kind of tool you need, because Java is not quick.
-
It depends on what kind of tool you need, because Java is not quick.
We have already know that it depends.
Depends.
Java is not quick? Maurice Greene is not quick.
-
Well. I don't like Java simply because you can't test if an int/double/any non-boolean is non zero without explicitly typing it.. (like if(someint) won't work, you have to type if(someint != 0), same with if(!someint)) Also I don't like the whole only allowing one public class per file thing.. things like that should be the programmer's choice not the tool's
That's why I prefer C# for my completely OO environment :)
-
Only one public class per file? I'm not sure that limitation still exists.
It depends on what kind of tool you need, because Java is not quick.
When I think quick and dirty tool, I think, reusing my editor classes to conform quickly to whatever map, files, etc. that I'm looking to work with, not quick as in OMG PONIES JAVA IS DA BEST!11111
-
C# isn't much better on the small/fast side. I love it millions of times more than java, but I wouldn't release an actual project in it (anymore).
-
Yeah exactly, a project would be reserved for the best language in terms of features and platform compatibility... but my point about Java was just that it was nice to use when you need it for something small, especially when you have no idea what platform it would be used on. Nobody is going to agree or persuade anyone, so don't bother flaming this thread.
-
Java is still the most "popular (http://www.tiobe.com/tpci.htm)" programming language, thus you are more likely to have a job if you know it.
Yeah exactly, a project would be reserved for the best language in terms of features and platform compatibility...
Need any more be said :P
-
Solution: Learn all the languages.
-
/me takes a peek @ the chart:
I didn't realise that visual basic was that high up on the ladder.
What's really amazign is that there is no mention of assembly or machine languages....
/me is getting way too old...
-
Man this chat went from me being able to understand what being said to blahhhhhhh.... Gotta read more I guess
-
Blame it on Java. It's not quick and dirty, it's slow and dirty. ;)
I'm going to have to agree with eiii here on C#. I've barely touched it, but it's pretty simple to use. You can just drag and drop stuff on an interface and make it work. It's good for learning the basics of programming, but I probably wouldn't release any projects with it due to the potential dependencies/overhead/compatibility issues.
-
All programming is the same, short of assembler and register/stack hell.
It's all about the libraries, or writing your own!
-
ummm, unix is an operating system. ;D similar to linux. so if you learned how code in c++ on a linux based system, the application would not run on windows. Thats why in the paintball 2 source there is the windows version to compile, and the linux version to compile. u can compile linux-based, or in this case unix-based applications on windows, just not run them. they use different syntax.
-Cusoman
that's not true at all =/.
The syntax for C++ is the same, no matter the OS.. I liked C++ for Dummies to start off, personally. Web tutorials ftl, books ftw! Spend $20 =P
-
You can't copy/paste from books. :P
-
/me takes a peek @ the chart:
I didn't realise that visual basic was that high up on the ladder.
What's really amazign is that there is no mention of assembly or machine languages....
/me is getting way too old...
yah, visual basic is out there more than some ppl realize.
and ... i think i might like to learn assembly some day :)
Blame it on Java. It's not quick and dirty, it's slow and dirty. ;)
...
ACTUALLY... that's not necessarily the case anymore. [reference link (http://java.sys-con.com/read/45250.htm)]
but i'll give you this, one thing i hate about java is the gui it makes. that alone would make me want to use a language that can be compiled to natively run on a particular platform.
i haven't learned any c++ yet... but so far, i think i like C.
oh ... and PHP, but that doesn't count. ;)
-
*Assuming* those results are accurate, which are dubious in themselves (seeing the guy doesn't have much of a clue of what he's actually doing), the server JVM seems to be much faster, but the downside is that it uses more memory and takes longer to start up. The client JVM is already horrible at that, so I wouldn't want to use the server JVM anyway. The GUI libraries for Java also seem to be very bad; they're ugly, not native, don't refresh correctly, are slow to update, etc. etc. For most application, the faults in the GUI negate any optimization that may be available in Java.
PHP is an interpreted language, though it can do native GUIs easily. Downsides, besides not being compiled, are that there is no official support for multi-threading and that the runtime library is huge. However, I'd rather using a PHP program more than a Java program since its interface feels natural and not like a fake crappy attempt.
In other news, Actionscript is getting more prevalent now, with Apollo and all.
-
PHP > Java. Good one sk89q. Ever heard of SWT?
-
...
The GUI libraries for Java also seem to be very bad; they're ugly, not native, don't refresh correctly, are slow to update, etc. etc. For most application, the faults in the GUI negate any optimization that may be available in Java.
exactly what i was trying to say ... but worded better. :)
PHP is an interpreted language, though it can do native GUIs easily. Downsides, besides not being compiled, are that there is no official support for multi-threading and that the runtime library is huge. However, I'd rather using a PHP program more than a Java program since its interface feels natural and not like a fake crappy attempt.
In other news, Actionscript is getting more prevalent now, with Apollo and all.
Yah I've never tried out the whole PHP-GTK thing but it sounds sorta interesting.
and ... actionscript??? to make actual programs?? not Flash files??? hm.
-
PHP > Java. Good one sk89q. Ever heard of SWT?
I didn't say PHP was better than Java. I was saying I would prefer using a PHP interface than a Java one.
Yes I have heard of SWT, and I am pretty sure I have used programs that used SWT. However, I have never, in my life, come across a Java program that actually successfully emulated the native interface. I don't program in Java, although I've learned it. When you use a Java program, you know it's written in Java. There shouldn't be a reason (other than startup time) that I should know that it's Java.
However, if you use Winbinder with PHP, there is no way to tell you that the program is written in PHP. Now, the toolkit was written in C, but that doesn't matter to me. It has the responsiveness of a program compiled to native machine code.
exactly what i was trying to say ... but worded better. :)
Yah I've never tried out the whole PHP-GTK thing but it sounds sorta interesting.
and ... actionscript??? to make actual programs?? not Flash files??? hm.
Macromedia/Adobe has been going to way of extending Actionscript into many different uses and platforms for several years now. The language has been completely revamped; Actionscript 3 is barely anything like Actionscript 1 other than the basic EMCA syntax. Performance has more than quadripled between incrementing versions of the Actionscript engine. Programming AS is now very object oriented and it fully supports the popular paradigms like model-viewer-controller, etc. Flex and Adobe AIR are two RIA frameworks that have come out recently that come to mind.
We're not to the point of ubiquitous downloadable Actionscript programs like Java has, but Adobe may be going there. With competition from Microsoft (esp. with Silverlight) and Java's own attempt with JavaFX, Adobe may choose to go in that direction. They have the resources and the existing community without all the stigma that Java carries. .NET is also the same, and Microsoft's Flash equivalent is Silverlight (but Microsoft has its own stigma with developers).
-
What would be a good compiler for this syntax (http://www.cplusplus.com)? What is the difference between that syntax and visual c++?
*Yes, I know I revived an old topic but it for more info on the topic, not responding to what someone else said.
y00tz will know the answer.
-
They're both the same, or they should be. Each compiler/IDE has it's quirks and such. Where do you see them being different?
-
He's talking about managed c++ and native c++. Visual c++ can compile both, but im guessing you dont know how to.
Managed c++ (which is what you are learning) is basicly c#, and its pretty different from native c++.
y00tz will know the answer.
I guess I beat y00tz.
-
Is my link managed or native and what types of quirks are you talking about? I just finally understood what this topic was getting at so long ago.
I am just learning c++ so I want to be totally sure I am doing everything right.
-
The link you gave has documentation about native c++. If you want to start a native c++ project in visual c++, you need to go to Win32->Console application, and a wizzard will help you create one that is either a console application, or a window application. I suggest starting with console, since learning c++ with the windows api would be pretty harder.
-
Console app is native c++ and compiles to the command line right?
What is an example of managed?
-
Console app is native c++ and compiles to the command line right?
Yes.
What is an example of managed?
using namespace System;
int main(array<System::String ^> ^args)
{
Console::WriteLine("Type 'quit' to quit...");
while(Console::ReadLine() != "quit")
{
Console::WriteLine("Type 'quit' to quit...");
}
return 0;
}
-
Yes.
using namespace System;
int main(array<System::String ^> ^args)
{
Console::WriteLine("Type 'quit' to quit...");
while(Console::ReadLine() != "quit")
{
Console::WriteLine("Type 'quit' to quit...");
}
return 0;
}
Can managed be compiled as a console program?
Is native used to make games and managed is used for other then that? If I am wrong, what is managed used to do and what is the value of knowing it? Cobo said managed is like C# so is it valuable to know C# and managed or just one of the two?
-
...yes. I'd suggest you look into how this all works a bit more before diving in.
-
What would wrap up all these questions into one good search phrase for Google?
-
'Tutorial'.
-
Managed C++ = .NET + C++
Syntax is more like C++ than C#, and you can mix both unmanaged (regular C++) and managed (.NET) code.
-
Thanks for all the help. I am learning native c++ for now, thanks again
-
Should be noted that managed C++ is deprecated... The standard as of .Net 2.0 and higher is C++/CLI (Same idea, they just wiped away more of the blood left over from sledge-hammering Managed CLI into an unmanaged language :P)