|
| 06 Aug 2012 07:30 PM |
| Yay. Um, any tips on what you got confused on? |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 07:33 PM |
obj a = .. obj b = a
b is a copy of a not a reference to it |
|
|
| Report Abuse |
|
|
| |
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 06 Aug 2012 07:34 PM |
Pointers will take a while to learn You can embed assembly You can still use C headers VS2005 doesnt include stuff like windows.h |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 07:34 PM |
also sfml is good if you want to make 2D crap
if you want to make 3D crap don't |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 07:35 PM |
"Pointers will take a while to learn "
why so? |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 06 Aug 2012 07:36 PM |
| i learned it when i was stupid and had only lua and python experience |
|
|
| Report Abuse |
|
|
Tarabukka
|
  |
| Joined: 18 Jan 2011 |
| Total Posts: 394 |
|
|
| 06 Aug 2012 07:43 PM |
obj something = obj("constructor"); // something is on the stack, if we pass it to another function it'll be copied obj* something2 = new obj("constructor"); // something2 is on the heap // something2 points to an "obj" allocated on the heap // we can pass it to other functions and it'll be the same place in memory we're referring to something.member(); something2->member(); // use -> for pointers delete something2; // delete heap allocated objects when you are done with them something2->member(); // segmentation fault: something2 is gone from memory
std::string* heapStringArray = new std::string[3]; *heapStringArray = "hi"; // heapStringArray is now a pointer to the string "hi"; *object gets the value of the pointer "object" heapStringArray++; *heapStringArray = "yo"; heapStringArray--; std::cout << heapStringArray[1] << std::endl; // "yo"
I think that's all there really is to pointers... |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 08:43 PM |
Yay!
I PASTEd my first program in a BIN. Its a simple hello world program
JD3qc8uD |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 08:45 PM |
My tip is to never include windows.h unless you really need it.
SERIOUSLY. I HATE THAT FILE. |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 08:45 PM |
My tip is to never include windows.h unless you really need it.
SERIOUSLY. I HATE THAT THING. |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 08:46 PM |
| wth double post + somehow bypassing floodcheck |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 08:52 PM |
>I HATE THAT FILE >I HATE THAT THING
Mhmm.... |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 08:58 PM |
I made a simple multiplication calculator =3 Maybe I will get a simple game going soon! But g'night for now |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 09:24 PM |
"I made a simple multiplication calculator" "Maybe I can start developing awesome games now!"
Lol yeah, C++ does that to you. |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
|
| 06 Aug 2012 09:29 PM |
"b is a copy of a not a reference to it"
But if a and b were pointers... |
|
|
| Report Abuse |
|
|
geicogeko
|
  |
| Joined: 27 Apr 2010 |
| Total Posts: 2727 |
|
|
| 06 Aug 2012 10:17 PM |
| I'm learning c, I gave c++ up a few weeks ago. I may learn it after. I raided a used bookstore and took all but 2 c books. |
|
|
| Report Abuse |
|
|
STFMAN
|
  |
| Joined: 21 Dec 2011 |
| Total Posts: 2075 |
|
|
| 07 Aug 2012 05:21 AM |
| i'm just started to learn how to script! but i need help! |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 07 Aug 2012 06:09 AM |
i dont like doing windows.h
da heck
so annoyin |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 07 Aug 2012 06:15 AM |
I don't like long define thingies
like
#define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 4
from WinInet.h |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 07 Aug 2012 06:17 AM |
#define SUNTZU_IS_TROLLIN_UP_SCRIPTERS_FORUM_UP_AGAIN_WTH_ITS_SO_ANNOYIN_RITE_QUESTIONMARK
from C&G
eenet |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 07 Aug 2012 06:19 AM |
But seriously can't you just type 4 instead of INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY
?? |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 07 Aug 2012 06:22 AM |
idk
c++ spits out werd errors all the time |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 07 Aug 2012 06:23 AM |
| its your bad code which spits out werd errors all the time |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2012 08:57 AM |
Why learn C++ when you can learn C. It is more advanced ╔══════════════ღ☃ღ══════════════╗
~ ~ ~ ~ ~ ~ Repost this if ~ ~ ~ ~ ~ ~
you are a strong independent black woman
~ ~ ~ who don’t need no man ~ ~ ~
╚══════════════ღ☃ღ══════════════╝ |
|
|
| Report Abuse |
|
|