seeing as some people are unimpressed with my visual basic stuff ive decided to learn C++ just got my hands on a e-book.
My first program(can you guess what it does :p)
[code]
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
int Number1;
cout <<"Enter the first Number:";
cin >> Number1;
int Number2;
cout <<"Enter the second Number:";
cin >> Number2;
int Answer;
Answer = Number1 + Number2;
cout << "The Answer is:";
cout << Answer << endl;
system("PAUSE");
return 0;
}
[/code]
i was surprised how similar it was to other programming languages i know and have used like VB, java and pascal
Incoming shit storm
[QUOTE=r4nk_;18789387]Incoming shit storm[/QUOTE]
Dang, I'm wearing a white shirt...
wait! whats up with that?
my post or guys above it?
seriously stop rating me dumb when im trying to ask a serious question
good page.
[QUOTE=mak364;18789357]seeing as some people are unimpressed with my visual basic stuff ive decided to learn C++ just got my hands on a e-book.
My first program(can you guess what it does :p)
[code]
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
int Number1;
cout <<"Enter the first Number:";
cin >> Number1;
int Number2;
cout <<"Enter the second Number:";
cin >> Number2;
int Answer;
Answer = Number1 + Number2;
cout << "The Answer is:";
cout << Answer << endl;
system("PAUSE");
return 0;
}
[/code]
i was surprised how similar it was to other programming languages i know and have used like VB, java and pascal[/QUOTE]
aaa aaaa AAAA AAAAA
[QUOTE=mak364;18789357]My first program(can you guess what it does :p)[/QUOTE]
I believe that's from "C++ For Dummies"
Rather appropriately named...
the header is i derived the rest from bits of the first program.
where do you define the name in the program? if its namespace do not rate me boxes please
[QUOTE=garry;18788378]Got our SVN dumping to twitter - for no reason at all
[url]https://twitter.com/FacepunchBot[/url][/QUOTE]
Really, twitter feeds like this require no reason, and I don't think anybody is going to ask for one.
[editline]08:05PM[/editline]
[QUOTE=mak364;18789357]seeing as some people are unimpressed with my visual basic stuff ive decided to learn C++ just got my hands on a e-book.
My first program(can you guess what it does :p)
[code]
system("PAUSE");
[/code]
i was surprised how similar it was to other programming languages i know and have used like VB, java and pascal[/QUOTE]
Let's just agree never to speak of this again.
so using system("PAUSE"); is pretty bad then?
[QUOTE=mak364;18790711]so using system("PAUSE"); is pretty bad then?[/QUOTE]
Just out of curiosity I copy and pasted your exact question into [url="http://www.google.com/search?hl=en&safe=off&client=firefox-a&channel=s&rls=org.mozilla%3Aen-US%3Aofficial&hs=biU&q=so+using+system%28%22PAUSE%22%29%3B+is+pretty+bad+then%3F+&btnG=Search"]google[/url] and got some pretty funny results.
Nice results on why you shouldn't use it:
[url]http://www.gidnetwork.com/b-61.html[/url]
After serious consideration I've decided to scrap "building" my own engine, and just use irrlicht.
I haven't used it since about 0.2, and the thing is now at 1.6, which is a pretty damn long time. I was considering ogre, but I am more familiar with irrlicht. :)
OMG my crappy tablet recorded video! I haven't done much coding due to finals. D: But this is what I have done so far for the game mode unBEARable.
[media]http://www.youtube.com/watch?v=yz3oLp8Fwik[/media]
Regarding the retarded pictures on computer books:
[img]http://covers.oreilly.com/images/9780596001322/lrg.jpg[/img]
[img]http://s3.amazonaws.com/adaptiveblue_img/books/c_in_depth_what_you_need_to_master_c_2_3/jon_skeet[/img]
I have them both and the covers really shit me
[QUOTE=turby;18795277]Regarding the retarded pictures on computer books:
-snip-
I have them both and the covers really shit me[/QUOTE]
I have the Perl book and a Oreily Programming C# 3.0 Book. The covers look weird at time but the information inside them is amazing. If anyone has the Oreily Programming Python book, it appears they packed almost everything that you need to know about Python in that thing with 1600 (3rd Edition) or 1216 (4th Edition) pages.
[QUOTE=mak364;18789357]seeing as some people are unimpressed with my visual basic stuff ive decided to learn C++ just got my hands on a e-book.
My first program(can you guess what it does :p)
[code]
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
int Number1;
cout <<"Enter the first Number:";
cin >> Number1;
int Number2;
cout <<"Enter the second Number:";
cin >> Number2;
int Answer;
Answer = Number1 + Number2;
cout << "The Answer is:";
cout << Answer << endl;
system("PAUSE");
return 0;
}
[/code]
i was surprised how similar it was to other programming languages i know and have used like VB, java and pascal[/QUOTE]
People on here don't have patience for newbies it seems.
When this is probably your first time working with C++ you wouldn't know why using the system() function is a recourse guzzler.
My advice is to not post your code on this site unless you are asking a question.
[QUOTE=Helpful stalker;18795572]People on here don't have patience for newbies it seems.
When this is probably your first time working with C++ you wouldn't know why using the system() function is a recourse guzzler.
My advice is to not post your code on this site unless you are asking a question.[/QUOTE]
I understood why system() sucks, and I'm not a C++ programmer.
I've worked with C (albeit not much), but I've never used system()
Here's some random development screenshots
[img]http://filesmelt.com/downloader/08Dec2009_003.jpg[/img]
These things are moving very slowly. This is to test the new first person movement control system (since skyboxes don't move so you wouldn't know whether you're moving or not :))
[img]http://filesmelt.com/downloader/04Dec2009_002.jpg[/img]
I optimized the network code. Got the time it was taking down from 5ms to 0ms (roughly). This was because I had a system where it was notifying the GUI every time it was updated. Which is bad. Also - there's only 2000 objects here - the draw lag is because my sprite drawing is critically unoptimized ( and maybe should use a vertex shader :/ )
[img]http://filesmelt.com/downloader/04Dec2009_003.jpg[/img]
Prediction is working lovely now. The arrow is where the cursor is pointing, not velocity (else it would be backwards :)). It's the Valve system, where all entities are lerped 2*TICK TIME. If the predicted var fucks up, it corrects itself gradually.
[img]http://filesmelt.com/downloader/08Dec2009_004.jpg[/img]
A quick space game that Helk knocked up to test the control prediction + threaded tick.
That is looking pretty damn awesome, I'm amazed at how fast you implemented the input/output system, and got it working.
Good job, Garry!
[QUOTE=garry;18797301]Lot of stuff[/QUOTE]
The most impressive thing about everything you do garry is how damn fast you get it done, you seem to churn out good shit every week.
Plus that would be pretty damn impressive even if it took a lot longer.
[editline]12:30PM[/editline]
[QUOTE=Dr Magnusson;18797421]I'm amazed at how fast you implemented the input/output system, and got it working.[/QUOTE]
Ninjad :(
I presume you do your actual timing at a higher resolution garry?
[img]http://i50.tinypic.com/znkaap.png[/img]
[QUOTE=blankthemuffin;18797436]I presume you do your actual timing at a higher resolution garry?[/QUOTE]
What do you mean?
[QUOTE=garry;18797795]What do you mean?[/QUOTE]
Something smaller than milliseconds. Nanoseconds or summin.
Of course, it ticks 20 times a second, but rendering is as fast as it can.
Programming in VBscript (ugh I know) for my job. The lack of support for proper data structures steals most of my time and makes my code more complicated than it needs to be (if written in another language).
Also, [url=http://www.flatredball.com/frb/]FlatRedBall December release is live[/url] for those interested. Great engine which makes XNA even more easier than it already is.
[QUOTE=Jallen;18797426]The most impressive thing about everything you do garry is how damn fast you get it done, you seem to churn out good shit every week.
Plus that would be pretty damn impressive even if it took a lot longer.
[editline]12:30PM[/editline]
Ninjad :([/QUOTE]
Money hats make you code fast.
Sorry, you need to Log In to post a reply to this thread.