Is this site biased towards C++? - Off-topic

Hi,
so I'm thinking of learning C. I went looking for some guides on Google and then I stumbled upon this site:
http://www.cprogramming.com
So I've checked it out and I think that it's a bit biased towards C++. I'm probably wrong, but can some people have a look around for themselves and tell me their opinions on it?
Also, when I came to this bit of the site:
http://www.cprogramming.com/tutorial/c/lesson1.html
I noticed that when I downloaded Code::Blocks, it's actually a C++ compiler. I think I'm wrong, but can someone confirm it?
I've decided that I want to learn C first. Then maybe I can move on. I find it very annoying that there are arguments and stuff about whether a person should learn C first or C++. After looking at these arguments, I've decided that I'll just learn C and C what happens (excuse the pun).
I'd like it if both programmers that program in C and those who don't program at all check this site out.
Thanks,
A person who is very confused.

You can compile C programs in a C++ Compiler. Actually Turbo C++ is bit more easy to use than Turbo C, because TC++ has mouse controls. Anyways you have to save the program as .C extension apart from the default .CPP extension.
EDIT: I guess you are trying to use on a Linux Platform. So excuse my above suggestions about TC and TC++, because it works only on windows.
http://www.cprogramming.com/tutorial/c/lesson1.html
I guess its biased to C++ (Look their favicon) and maybe its just because C++ is bit more easier than C, because its based on OOP.

Thanks for your opinion. No, I think I'll be compiling on Windows. I do have Ubuntu though.
Maybe you're right about C++, but still. That doesn't mean they should keep making references to C++ when the user was looking to learn C.
Do you program?

Bad-Wolf said:
Thanks for your opinion. No, I think I'll be compiling on Windows. I do have Ubuntu though.
Maybe you're right about C++, but still. That doesn't mean they should keep making references to C++ when the user was looking to learn C.
Do you program?
Click to expand...
Click to collapse
But I guess in that Tutorial the concepts explained is in respect to C especially syntaxes. There is not much difference in it though, its like printf in C while cout << in CPP and scanf in C while cin >> in CPP.
I don't program much in C/CPP. But had it academically, and I'm happy that I cleared those papers somehow.
Sent via Mobile

OK. Thanks.
Anyone else who'd like to share their thoughts?

Bad-Wolf said:
OK. Thanks.
Anyone else who'd like to share their thoughts?
Click to expand...
Click to collapse
I had suggest using howstuffworks.com to learn C...Found it a bit confusing to learn C in this site
Insert witty sentence here

http://1.bp.blogspot.com/-CPsNThmwnDs/T_HjTK0K2XI/AAAAAAAAAtk/TwF3pExjm50/s1600/DIFFF.jpg
Sent from my GT-I9100 using xda app-developers app

If you have installed the build-essential package on Ubuntu, 'sudo apt-get install build-essential' , then it will have installed the GNU compiler which contains both a C and a C++ compiler.
Create/edit your C program as hello.c and use 'gcc hello.c' to compile it. By default it creates the executable file as a.out in the current directory. Use -o to override it to something else.
Use './a.out' to run it.
For C++ programs, create the source file as hello.cc and use 'g++ hello.cc'
While the C compiler will recognise '.cc' source files as C++ and compile them, the linker may run into trouble later, trying to resolve the references between the different libraries.
Stick to one or the other.

Related

Free compiler for old coder, suggestions?

Getting back into coding. Wondering if anyone has suggestions for a compiler for fortran, c++, java, vb and cobal. I really enjoy c++. Found a good resource for libraries (http://www.cplusplus.com/). There are just so many free compilers out there, wanted to know what y'all liked to use and why.
Thanks for looking at the thread and for any help if you give some.
From a phone
boborone said:
Getting back into coding. Wondering if anyone has suggestions for a compiler for fortran, c++, java,vb and cobal. I really enjoy c++. Found a good resource for libraries (http://www.cplusplus.com/). There are just so many free compilers out there, wanted to know what y'all liked to use and why.
Thanks for looking at the thread and for any help if you give some.
From a phone
Click to expand...
Click to collapse
Linux - gcc/++(for C++, there's something for fortran too, I think), javac(for java), I don't know about Cobal.
Windows - VS(for C++, and VB), whatever comes with Eclipse(probably javac still), and I don't know for fortran or cobal.
Just got done dling the vs iso. I'll check eclipse and javac out. Thanks man. Much appreciated.
From a phone

[Q] Software development

To all programmers,
I am a Young fellow interested in getting into software development. However, I don't know where to begin.. There's C++, java, and python all supposedly good languages to learn (c++ being a bit harder). Which one should i choose.. then I need books, sites, any kind of help/suggestions on the chosen language.. Please enlighten me developers! You all do great work for the community and I thank you for your time and input!
if you are looking for Android
you need Android SDK + Jave eclipse those are important to develop for Android
and there is some more softwares here in the XDA
APKTOOL etc
if you wanna edit apk (XML) Hex Editor is your choise
this is what i know
I was thinking of development I am completely new so perhaps that is the best route to go?
Sent from my MB860 using XDA Premium App
yup , 1st you have to know what is AndroidSDK , visit
code.google.com
and you'll get the basics
I started with vb, then c++, python, fortran, cobal, unix, and now java. Java is what Android apps run on. But vb will give you basic skills. c++ will teach you about everything else. My $.02
Thank you all for your posts now for another question! How did you learn? It looks like ill be messing with a little of all of them though it seems I may focus more on Java. Did you learn with a particular website? Prefered books? Thanks again!
Sent from my MB860 using XDA Premium App
School and old programmers. I could not have learned it from reading a book.
I'm a rather persistent guy.. I think I could learn from a book and perhaps ask a few questions on hereshould the need arise. I have a few friends who have some knowledge as well on the subject. I think I can self teach myself I just need to know some of the sources others have used. like java for dummies if that's any good or for that matter a real book..
here
http://www.youtube.com/watch?v=Hl-zzrqQoSE&feature=youtube_gdata_player
Head first Java is a good book for beginners.
If you have no prior experience in programming, I would recommend starting with Visual Basic. The Code Project website is an excellent resource.
And if you are going to start with Visual Basic, then the MSDN website will have tutorials, code examples, etc.
guys he is going to develop for android i (Think) , why the heck he needs visual basic for ? android app only can develop by AndroidSDK and ECLIPSE(JAVA)
visual basic its for pc apps though
k0sh said:
guys he is going to develop for android i (Think) , why the heck he needs visual basic for ? android app only can develop by AndroidSDK and ECLIPSE(JAVA)
visual basic its for pc apps though
Click to expand...
Click to collapse
You start with basic cause it's just that, basic. Teaches you principle concepts. Things that you would already know if doing java. Taking a java class or reading a java book, they think you already know boolean logic. It's just a good base knowledge set to have.
thekdub said:
And if you are going to start with Visual Basic, then the MSDN website will have tutorials, code examples, etc.
Click to expand...
Click to collapse
http://msdn.microsoft.com/en-us/vbasic/ms789056
That's right, forgot about that. Tons of free stuff
so what I'm getting is I should develop on pc first visual basic is a good starter. Interesting, Now I have a few sources on all of them except C++ which though I may not mess with it immediately I may take a peek at it anyways. Glad to know I have same people that know what their talking about helping me out! my friends have limited knowledge.

[HELP NEEDED] Porting ROMs, kernels to the GT540

Hi XDA users!
I'd like to get some help, because I would like to learn how to port ROMs to the LG GT540. I'd also like to learn how to port kernels(.32 or .35) to the phone. I won't get a new phone for at least a year, so that's why I'd like to learn these.
If you can help me, I'd appreciate it! What do I need for it?
I read somewhere that I need Linux, but do I need to know about programming? If yes, then which language? I had been learning Python in the summer for 2 monts, I liked it, but I'm afraid none of you know that language.
So I welcome any suggestions of how to start!
u need c++ c and java i think
andreas__ said:
u need c++ c and java i think
Click to expand...
Click to collapse
I was thinking about these 2 languages to learn. Is c++ based on C or not? Which software should I use to learn? Would Microsoft Visual c++ be good?
For the kernel you will need c - but not very simple c Also it's best to know the configuration for the gt540 to make it run. For the UI - it's written in Java.
So where should I start? Just pick up and e-book and start learning C and Java?
martin255 said:
So where should I start? Just pick up and e-book and start learning C and Java?
Click to expand...
Click to collapse
First it's best to start with C, but not the hardware C - it's too comlicated for starting. Then you can continue with C++, learn the object orientated programming basics, classes, inheriting etc. Then you can go on with Java It sounds difficult, but if you learn C and C++ well, Java shold be a piece of cake I think it's easier to write apps for your phone frist, than hacking kernel
As for IDEs i use: Eclipse (for Java), C-Free (C) , NetBeans(for Java, C++, C)
Some useful links:
http://www.cplusplus.com/doc/tutorial/
http://developer.android.com/index.html
Hope I could help! Hajrá!

iOS or Android Development

Which is better and more intrestiong iOS development or Android Development???
In what way?
Both are different forms of coding, however 2 separate languages
MacaronyMax said:
In what way?
Click to expand...
Click to collapse
In having fun
MacaronyMax said:
Both are different forms of coding, however 2 separate languages
Click to expand...
Click to collapse
I know but I develop nothing now so I want to start from the very beggining
This is an Android and Windows Phone forum. There's only a minority of people on here with iPhones or iPads, so I'd imagine a very small number of developers. You're gonna get a VERY biased point of view on here.
What programming have you done before now, and why do you want to program for either platform?
Archer said:
This is an Android and Windows Phone forum. There's only a minority of people on here with iPhones or iPads, so I'd imagine a very small number of developers. You're gonna get a VERY biased point of view on here.
What programming have you done before now, and why do you want to program for either platform?
Click to expand...
Click to collapse
I Didn't try any language until now!!!
Gen1usw0rk said:
In having fun
I know but I develop nothing now so I want to start from the very beggining
Click to expand...
Click to collapse
I guess you could say neither are fun, writing out hundreds of lines of code, It's up to you, I mean, Android is a growing OS, and if you can develop a quality app you have the potential for more users, and IOS also has a large user base, The are no 'thrills' that one has over the other, but if you want to develop for IOS you must be using a Mac with xcode installed, otherwise to develop android you need the SDK and eclipse which is available on most major OS's (Windows, Mac, Linux)
MacaronyMax said:
I guess you could say neither are fun, writing out hundreds of lines of code, It's up to you, I mean, Android is a growing OS, and if you can develop a quality app you have the potential for more users, and IOS also has a large user base, The are no 'thrills' that one has over the other, but if you want to develop for IOS you must be using a Mac with xcode installed, otherwise to develop android you need the SDK and eclipse which is available on most major OS's (Windows, Mac, Linux)
Click to expand...
Click to collapse
OK!! in your experience how can I start developing android from the very beggining????
Gen1usw0rk said:
I Didn't try any language until now!!!
Click to expand...
Click to collapse
The main question you should be asking then, is weather you want to learn Objective C or Java, Both can be used for non iOS/android things and one day you might want to try something PC based using one of the languages you learn
---------- Post added at 08:15 PM ---------- Previous post was at 08:13 PM ----------
Gen1usw0rk said:
OK!! in your experience how can I start developing android from the very beggining????
Click to expand...
Click to collapse
Either a course in college, Orrr, online tutorials, I reccoment checking out thenewboston and mybringback for video tut's both are useful
Gen1usw0rk said:
OK!! in your experience how can I start developing android from the very beggining????
Click to expand...
Click to collapse
Honestly not being funny here. Get a dummies guide, since you're starting from scratch. It's a MASSIVE field that you're entering and there's years and years worth of learning ahead of you, if you want to be any good. This isn't gonna happen overnight, and it won't happen easily.
The main question you should be asking then, is weather you want to learn Objective C or Java, Both can be used for non iOS/android things and one day you might want to try something PC based using one of the languages you learn
Click to expand...
Click to collapse
Which is more powerful in your opinion????
Archer said:
Honestly not being funny here. Get a dummies guide, since you're starting from scratch. It's a MASSIVE field that you're entering and there's years and years worth of learning ahead of you, if you want to be any good. This isn't gonna happen overnight, and it won't happen easily.
Click to expand...
Click to collapse
I already have android development for dummies but it tells you to buy xml and java books??
Gen1usw0rk said:
I already have android development for dummies but it tells you to buy xml and java books??
Click to expand...
Click to collapse
If it's telling you to get a Java book then it's not a very good "Android for dummies" book. Xml is very straight forward and there's more than enough online to sort you out with that. It's only a way of structuring data, anyway.
The only real answer to your question is another question. What platform do you want to develop on?
The language and platform are irrelevant to the amount of fun or anguish that you will face while developing software.
Archer said:
If it's telling you to get a Java book then it's not a very good "Android for dummies" book. Xml is very straight forward and there's more than enough online to sort you out with that. It's only a way of structuring data, anyway.
The only real answer to your question is another question. What platform do you want to develop on?
The language and platform are irrelevant to the amount of fun or anguish that you will face while developing software.
Click to expand...
Click to collapse
I think I want to develop android!!
Gen1usw0rk said:
Which is more powerful in your opinion????
Click to expand...
Click to collapse
I don't know much about Objective C but afaik (Someone correct me? ) it's based on C#/C++ so picking up those languages could be easier, Java can be used in Applets on the web, PC programs and games (eg. Minecraft) but, I think the same can be done with C++
And the reason the Dummy book told you to get the others is because the Android one is telling you how to use the java you should already know, but don't so that it can be more in detail, also I would say maybe skimp the xml one as it's mainly fairly simple in android as far as my experience is with it anyway (not much))
MacaronyMax said:
I don't know much about Objective C but afaik (Someone correct me? ) it's based on C#/C++ so picking up those languages could be easier, Java can be used in Applets on the web, PC programs and games (eg. Minecraft) but, I think the same can be done with C++
And the reason the Dummy book told you to get the others is because the Android one is telling you how to use the java you should already know, but don't so that it can be more in detail, also I would say maybe skimp the xml one as it's mainly fairly simple in android as far as my experience is with it anyway (not much))
Click to expand...
Click to collapse
What language did you really tried to develop???
AppReal said:
IMO developing android is easier because almost all tools are free if you've got PC. To develop ios you should have Mac what is additional cost.
Click to expand...
Click to collapse
I know that mac costs money
But I got a mac and xCode became free now!!!
Gen1usw0rk said:
What language did you really tried to develop???
Click to expand...
Click to collapse
I've tried a lil bit of many All extremely basic level so I have no idea what they're like at a more complicated level
But I have tried both Objective C and Android, I preffered the structure of the objective C and imo it looks more clean when coding, but Java I got further with
MacaronyMax said:
I don't know much about Objective C but afaik (Someone correct me? ) it's based on C#/C++ so picking up those languages could be easier, Java can be used in Applets on the web, PC programs and games (eg. Minecraft) but, I think the same can be done with C++
And the reason the Dummy book told you to get the others is because the Android one is telling you how to use the java you should already know, but don't so that it can be more in detail, also I would say maybe skimp the xml one as it's mainly fairly simple in android as far as my experience is with it anyway (not much))
Click to expand...
Click to collapse
Nearly, but the wrong way round. C begets C++ begets C#. C++ is the language of choice for most developers that want to communicate directly with hardware. Other languages tend to actually be writting in C or C++ and therefore only have wrappers for the really low-level functions.
But yeah, any C based language or Java can be used to develop apps on PC, Linux, Mac, so they're both good ways to go. Java for Android means learning Java as well as the Android framework, whereas C for iPhone means learning C and the iPhone framework. Both come with their benefits and drawbacks, but personally I think Java is easier to learn than C, purely because it's not as deep. Saying that though, I've never looked at objective C or the iPhone framework. I just know C/C++ from old days.
I wanted to develop android first but when I read this I changed my mind and got spinning my mind!!!!xD
Gen1usw0rk said:
I wanted to develop android first but when I read this I changed my mind and got spinning my mind!!!!xD
Click to expand...
Click to collapse
Lol - that's some trolling going on right there! Very misleading article too.

Need to learn the android development... From basics....

Hi,
First of all thank you so much for starting a forum for learning the Android Development.
I am very much interested in learning android, and i have gone through the official android developers site, and downloaded the SDK.
But i am stuck there, coz i am very new to the Linux/Unix part. I would like to learn more about that, but i do not want to learn programming unless it's necessary. I know it will take a long long time to learn that. So can anyone help me with the app development or fixing/understanding ROM/Kernels.
Sorry if i am being too much jumpy in the starting itself, It's because i do not know where/how to start.
Thanks,
Les
lesfauves said:
Hi,
First of all thank you so much for starting a forum for learning the Android Development.
I am very much interested in learning android, and i have gone through the official android developers site, and downloaded the SDK.
But i am stuck there, coz i am very new to the Linux/Unix part. I would like to learn more about that, but i do not want to learn programming unless it's necessary. I know it will take a long long time to learn that. So can anyone help me with the app development or fixing/understanding ROM/Kernels.
Sorry if i am being too much jumpy in the starting itself, It's because i do not know where/how to start.
Thanks,
Les
Click to expand...
Click to collapse
Unfortunately without learning programming, you will find it difficult to do any app development and kernel understanding or fixing.
Programming is key to both of these. So although you don't want to, have a look at some of the resources out there on how to learn to program.
Apps are written in java, kernel code is mostly C.
Maybe this helps? I think failing to start by learning to program will just leave you disappointed.
If it's okay, I'd like to suggest something.
@lesfauves
For kernel development, you really need to learn C, C+, C++ etc. C is the most important language here. However if you're gonna build vanilla kernels (with no modifications whatsoever), a simple guide should do it. Modifying source code requires knowledge of C (and maybe some other languages) as pulser_g2 has said.
For app development, you need to know the basics of Java. It's a must. Otherwise you'll end up getting nowhere.
For ROMs, you need to have a good understanding of both Java and C (and some other languages).
You can learn these online. I'm learning C myself. It's really easy.
Hope I helped.
sgt. meow
I too want to learn android development, just dont know where to start. Been waiting for xda university to open up for this very purpose. now I went through the site and still have a couple questions. I see that learning C is fundamental, where would you guys suggest would be the best place to learn? i was hoping for something like codeacademy, they dont have C though. Also, which distribution of linux would you guys suggest to install?
If you just want to dive in, and have fun creating small Android apps, learning Android concepts as you go, I highly recommend MIT App Inventor (AI): http://appinventor.mit.edu/ . It used to be Google AI but Google wanted to focus on other things.
I have decades of experience in Unix & Linux low level mostly C software development, but was new to Android & Java in Feb. 2011. App Inventor was a great intro to Android concepts, but it seems almost impossible to make commercial quality apps of any size with it.
So after a few months I dove into Java with the Android SDK & the concepts I learned with AI transferred well.
If you want to run Linux on your PC, which is a great way to learn Linux in general, Ubuntu remains quite popular, but a lot of us techy types have moved to Mint. I'm still on Ubuntu but will likely try Mint at some point.
The original and seminal book on C language is this: http://en.wikipedia.org/wiki/The_C_Programming_Language . It was a great intro for me back in the 1980's. But many C++ people will tell you learning C first may mess you up for C++. I never really caught on to C++ and don't care now as Java is IMO better.
This is the seminal book for C++: http://en.wikipedia.org/wiki/The_C++_Programming_Language
In general I think C is better for kernel and low level Android NDK stuff; C is the language of the kernel. For higher level Java of course, using Eclipse as an IDE since it still is the most widely used IDE I think.
Any good sites or tutorials for learning Linux????????????/
l0lh4rd said:
Any good sites or tutorials for learning Linux????????????/
Click to expand...
Click to collapse
http://www.ee.surrey.ac.uk/Teaching/Unix/
sgt. meow said:
If it's okay, I'd like to suggest something.
@lesfauves
For kernel development, you really need to learn C, C+, C++ etc. C is the most important language here. However if you're gonna build vanilla kernels (with no modifications whatsoever), a simple guide should do it. Modifying source code requires knowledge of C (and maybe some other languages) as pulser_g2 has said.
For app development, you need to know the basics of Java. It's a must. Otherwise you'll end up getting nowhere.
For ROMs, you need to have a good understanding of both Java and C (and some other languages).
You can learn these online. I'm learning C myself. It's really easy.
Hope I helped.
sgt. meow
Click to expand...
Click to collapse
I wanted to to help my phone community and my self of course...from where you can learn c online??i know my way with pc i make some roms from my community but i need to start learning to compile from source!!! share your links if you can thanks!!
Lynda.com
pikachukaki said:
I wanted to to help my phone community and my self of course...from where you can learn c online??i know my way with pc i make some roms from my community but i need to start learning to compile from source!!! share your links if you can thanks!!
Click to expand...
Click to collapse
A great site that I use to learn with for web design and development is Lynda.com which has a good amount of C tutorials and learning. It isn't free but a subscription is worth the site. There is a huge amount of information, tutorials, and learning that can be done there.
Go look at my post in this forum section.! May help you
Sent from my PG86100 using xda app-developers app
Thats great but remember that i study pc hardware and i dont have none of programming knowlage at all!!!i once try to learn basic but i get bored cause i dont needed then
pikachukaki said:
Thats great but remember that i study pc hardware and i dont have none of programming knowlage at all!!!i once try to learn basic but i get bored cause i dont needed then
Click to expand...
Click to collapse
Aaaaaah gotcha
Sent from my PG86100 using xda app-developers app
Search for newboston.org in Google it has tutorial + forums for every language + android app development too must see website for me! Enjoy development
Sent from my GT-S5360 using xda premium
Ok lets say i want to learn how to make a device tree for my device cause noone make it...then compile aosp or cm and make it a usable rom for a device...to go to a bookstore to buy a book in my language to remove the possibility of wrong learning...what book to buy??java, c , c++??
This is a great idea, and as i have just started learning C at university (And Java next year woo!) i will be visiting this alot for reference and tutorials. I still find C hard to get grips with but i do have a basic understanding of it. I also like messing around with kernel's and stuff on android and really want to make my own ROM or kernel soon!
So thanks XDA and everyone involved in this !
pikachukaki said:
Ok lets say i want to learn how to make a device tree for my device cause noone make it...then compile aosp or cm and make it a usable rom for a device...to go to a bookstore to buy a book in my language to remove the possibility of wrong learning...what book to buy??java, c , c++??
Click to expand...
Click to collapse
If you want to learn how to make a device tree check outthis guide, then when your ready to try compiling AOSP and Cyanogenmod check out this guide. If you want to learn to compile ROM's and then I would recommend a book on Linux and C for programming kernels such as C All-in-One Desk Reference. On the other hand if you want to program applications a good Java book is important and I would recommend Head First Java. Hope this clears things up, let me know if you still have questions.
shimp208 said:
If you want to learn how to make a device tree check outthis guide, then when your ready to try compiling AOSP and Cyanogenmod check out this guide. If you want to learn to compile ROM's and then I would recommend a book on Linux and C for programming kernels such as C All-in-One Desk Reference. On the other hand if you want to program applications a good Java book is important and I would recommend Head First Java. Hope this clears things up, let me know if you still have questions.
Click to expand...
Click to collapse
My point is basically to learn how to create the device tree and then compile any rom i can and hope that i can use fixes from others and hints from others...im not really interesting of making an application!!
can read my guide here
mithun46 said:
can read my guide here
Click to expand...
Click to collapse
Please stop spamming your link across each thread. And tone down the MASSIVE text in the thread - it just looks unprofessional.
so, where do I start? C or C++?
Sent from my R800i

Categories

Resources