| | #1 (permalink) | |
| Creating | Been around programmers for years, yet never actually got to work with them. Yes, I don't know one bit about computer programming. I've always wanted to know how to write programs, but I've never had the guts to go on the apparently difficult and gruelling path to become a programmer. Things turned dark and cold when I got to Half-Life map editing. I knew how to make wonderful environments, and got to explore world I created. But the world were horribly empty, or simple repeats of the same things I had created only days back. I had the source code right under my nose, but didn't have one bit of knowledge about how to use the wonderful tools.![]() But now, everything's gonna change. After coming to my new college, I was introduced to a course 'EC-101A'. Instantly I knew that I was where I always wanted to be. I would get to learn C++ in my very first semester, and possibly java by the second... ![]() So here I am, setting up my base camp, ready to build my bones. I hope others like me will join me in my quest, and those who already have undergone it will assist... I begin tomorrow... Till then, the compiler I use will be 'Dev-C++ 4.9.9.2', available from here. ---------------- ronthepon, capitals avoided. ![]() And don't ask me why. | |
| ||
| | #2 (permalink) | |
| Hypographer ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Finally learning C++! Good luck mate. Maybe you can write some stuff for Hypography eventually? ![]() ---------------- Your Friendly Neighborhood AdministratorWant to sponsor Hypography? Buy a print in our Fall 2008 Benefit Sale Join our Facebook group or follow us on Twitter Science is not only compatible with spirituality; it is a profound source of spirituality. - Carl Sagan | |
| ||
| | #3 (permalink) | |
| Resident Diabolist | Re: Finally learning C++! Why do you use C++ on hypography? Ronthepon I'm happy to help when you need it, but I won't guarantee I know it... ---------------- Administrator A COUNTRY WITHOUT AN ARMY IS LIKE A FISH WITHOUT A BIKE!!! I don't believe in god, but I do believe in what others call utopies. | |
| ||
| | #4 (permalink) | |
| Hypographer ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Finally learning C++! Hypography is all PHP and ColdFusion...but ColdFusion is built on Java and can use compontents written in C++. ![]() ...but we're probably purely PHP by the time ronthepon masters Java. ![]() ---------------- Your Friendly Neighborhood AdministratorWant to sponsor Hypography? Buy a print in our Fall 2008 Benefit Sale Join our Facebook group or follow us on Twitter Science is not only compatible with spirituality; it is a profound source of spirituality. - Carl Sagan | |
| ||
| | #5 (permalink) | |
| Resident USSRian | Re: Finally learning C++! lol it needs to be PHP, CF is a hogg and there is really no advantage of using it over PHP anymore ![]() if you wanna forward me the CF code, i can most definitely find time to start looking into changing it to PHP... Granted that i dont know CF, but then again, that didnt stop me this morning from learning VBScript... Rod, you'll pick it up, its a weird language to learn, but trust me unless you go assembly, after you know C++ you will have no problems learning new languages. And after you know a few, a new language is a matter of reading a book, and 2 weeks later you are programming in that language almost as well as a guy who has been learning it for 3-4 years. Trust me, been there with Python, Perl, Bash, Boe-Bot basic just to name a few.... ---------------- And remember that great question that Pierre-Simon Laplace and Sir Isaac Newton, Andrei Markov and David Hilbert, Richard Feynman and Enrico Fermi, Albert Einstein and Edmund Halley did not come to ask throughout all of their dedication and work: "Who the hell is IMing me?" This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License. ![]() | |
| ||
| | #6 (permalink) | |
| Creating | Re: Finally learning C++! Thankyouthankyou! I've had my first class today, and it focusses on the 'preliminaries'. What's a computer? A thingy that performs function on the data you feed it. Duh, big deal. ![]() We begin from the 'Von neumann computer architecture', which basically refers to there being the instructions and processing unit being two connected, yet somewhat separate entities. Fine... well... that's not new. Next we go to how a instruction is there. It's sorta like 'Operation to be done(What to operate upon)' Such as 'Add (X) and (Y)'. Read(X). Fine. Cool. What kind of operators are there? To name a few... Arithmetic operators - Add, Subtract, Multiply etc. Logical 'operators' - Compare: =, <, >, etc. Jump operators - Stop, Jump over, etc. Memory operators - Load, Store... I/O (For input/output) - Read, Display, Print, Beep, etc. And all of there operators are recognised by the computer as (the usual) strings of zeros and ones. Next, came the levels of languages. We found out about- Machine level (the zeros and ones) Assembly level High level If we dare to code in anything but machine level (which is boring, stupid, and difficult) we have to convert the instructions (in the higher level language) to their machine level counterparts. ![]() The program or algorithm (whatever) that we employ to do this (dirty work) is either a 'compiler' or a 'interpreter'. Both are 'translators'. The difference is that a compiler makes the machine level code, and totally saves it so that you can execute whenever. The interpreter reads the high level language 'instructiuon#1', 'interprets' it, executes it then goes to 'instruction#2'. The latter is slower for general purpose usage, but it's for the time when you wanna just try your high level code out and stuff. An example of a high level program follows... Code: (A, B are numbers stored in the secondary memory i.e. hard disk, or are simply input) 1 Read 'A' 2 Read 'B' 3 Load 'A' 4 Add 'B' 5 Store 'C' (whatever you just added) 6 Display 'C' 7 Beep 8 Stop ![]() Note the numbers before the instructions. They represent the 'address' of the instruction. The location in the memory. Where to find the instruction. Gotte re-hydrate my brain... will carry on later.BTW, comments and observations, and hopefully additions on what I give here are totally welcome and requested for! ---------------- ronthepon, capitals avoided. ![]() And don't ask me why. | |
| ||
| | #7 (permalink) | |
| Resident Diabolist | Re: Finally learning C++! '=' doesn't seem to me to be a logical operator to compare, but '==' is. Just in case you don't know = is an assignment operator a code like Code: if(x=2) on the other side the code Code: int x = 2; if(x==2) and Code: int x = 3; if(x==2) Note that in the two preceeding code segments '=' assigned a value to the integer x and '==' checked if the things on its sides are equal... ---------------- Administrator A COUNTRY WITHOUT AN ARMY IS LIKE A FISH WITHOUT A BIKE!!! I don't believe in god, but I do believe in what others call utopies. Last edited by sanctus; 08-17-2007 at 02:12 AM. | |
| ||
| | #8 (permalink) | |
| Creating | Now I have the pleasure of actually writing in C++ language. Here's what I was provided. Code:
#include <iostream>
using namespace std;
int main ()
{
cout << "Output text";
return 0;
}
Before I go on to what I learnt about the code, some things about C++:
Code: #include <iostream>
using namespace std; int main () {cout << "Output text"; return 0;} Code:
#include <iostream>
using namespace std;
int main ()
{
cout << "Output text";
return 0; }
The preprocessor is a program that works just before the compiler, and it's function is to search for directives for it. (It looks for lines beginning with '#") It processes these lines, and adds instructions into the code that we, the humans would find irritatingly boring and repeating (such as input, output methods). The codes it normally is used to adding is what makes C++ a mid-level language. (Needs some checking, is this correct?) Now let's dissect the above program to see it's guts before actually compile it.
Code: // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 2, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING. If not, write to the Free // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. // As a special exception, you may use this file as part of a free software // library without restriction. Specifically, if other files instantiate // templates or use macros or inline functions from this file, or you compile // this file and link it with other files to produce an executable, this // file does not by itself cause the resulting executable to be covered by // the GNU General Public License. This exception does not however // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. #ifndef _BACKWARD_IOSTREAM_H #define _BACKWARD_IOSTREAM_H 1 #include "backward_warning.h" #include <iostream> using std::iostream; using std::ostream; using std::istream; using std::ios; using std::streambuf; using std::cout; using std::cin; using std::cerr; using std::clog; #ifdef _GLIBCXX_USE_WCHAR_T using std::wcout; using std::wcin; using std::wcerr; using std::wclog; #endif using std::ws; using std::endl; using std::ends; using std::flush; #endif // Local Variables: // mode:C++ // End:
---------------- ronthepon, capitals avoided. ![]() And don't ask me why. | |
| ||
| | #9 (permalink) | |
| Creating | Compiled... Here it is, then. A massive ~450KB file that instantly opens a window, displays the text and closes the window before I can actually read a thing. To read the text, I'm forced to open the program in the command prompt. I'm forced to compress the freaking file. Why is it so big? And why does it close the window the moment it finishes? Again, compiled in the standard dev C++ 5 (beta) environment... ---------------- ronthepon, capitals avoided. ![]() And don't ask me why. | |
| ||
| | #10 (permalink) | ||
| Hypographer ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Compiled... Quote:
---------------- Your Friendly Neighborhood AdministratorWant to sponsor Hypography? Buy a print in our Fall 2008 Benefit Sale Join our Facebook group or follow us on Twitter Science is not only compatible with spirituality; it is a profound source of spirituality. - Carl Sagan | ||
| |||
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I'm finally here! | celtfaery | Introductions | 22 | 06-14-2006 01:37 PM |
| Sony is finally sued | alexander | Computer Science | 4 | 11-22-2005 05:20 PM |
| Finally ... Spokes! | C1ay | Astronomy news | 0 | 09-19-2005 04:39 AM |
| I finally joined... | beccareb | Introductions | 4 | 01-06-2005 09:04 PM |
| observing report... finally! 1/12/03 | deamonstar | Astronomy and Cosmology | 2 | 01-14-2003 01:25 PM |
All times are GMT -8. The time now is 01:14 PM.







I had the source code right under my nose, but didn't have one bit of knowledge about how to use the wonderful tools.












will carry on later.




