Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 01-29-2005, 10:57 AM   #1 (permalink)
slashdot
Registered User
 
Join Date: Dec 2004
Posts: 43
slashdot is on a distinguished road
What could I use a pointer var for?

As the name imposes.. what could I use a pointer variable for? Could you give me an example in gaming sense? Also, lets say I use "intVar" as my integer, do I have to use "pintVar" as my integer splat? (int*?) Thanx in advance!
slashdot is offline   Reply With Quote
Old 01-29-2005, 12:28 PM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
You can use pointers for:
- creating arrays
- passing arrays around
- implement polymorphism dynimically.
__________________
Valmont is offline   Reply With Quote
Old 01-29-2005, 09:20 PM   #3 (permalink)
slashdot
Registered User
 
Join Date: Dec 2004
Posts: 43
slashdot is on a distinguished road
K well I know that... I mean arrays, but I'm talking about something I could relate to. Instead of games, can someone relate what I can do with a pointer in real life? Like how booleons are logical AND, OR's, and IF's, would be like saying "I could get a salad and a potatoe, or a tomatoe." Well thanx in advance.
slashdot is offline   Reply With Quote
Old 01-29-2005, 11:16 PM   #4 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Talk decent english man. I can't understand a single sentence you're producing!
__________________
Valmont is offline   Reply With Quote
Old 01-30-2005, 08:42 AM   #5 (permalink)
slashdot
Registered User
 
Join Date: Dec 2004
Posts: 43
slashdot is on a distinguished road
???!!! nvmd...
slashdot is offline   Reply With Quote
Old 01-30-2005, 12:55 PM   #6 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Slashdot, I approach programming seriously:
The more serious you approach coding, the better you'll be in the end. We (I) am not toying around. Not here, nowhere.

Now look at this:
Quote:
K well I know that... I mean arrays, but I'm talking about something I could relate to.
What is this suppose to mean? Try to be unambigous.

Quote:
Instead of games, can someone relate what I can do with a pointer in real life?
Time out. Gaming is part of real life as well. There can be no distinction between them. Healthy people do not have dual personalities. For coders it means that the purpose of pointers in games are the same for non-gaming applications.

Quote:
Like how booleons are logical AND, OR's, and IF's, would be like saying "I could get a salad and a potatoe, or a tomatoe."
Once again, I can only hope to interprete your question right. Take a step back and look at your sentences.
Are you asking how to use mathematical logic for producing human-like sentences? What would you like to achieve exactly?

- If you would like to implement a program that produces english sentences, you'll need to learn production rules. I can help you with that yes. The bool operators are basically not needed then. There is a special technique for that.

- If you would like to learn how to transform a human-like sentence in terms of bool algebra, then I suggest you start with: modus ponens, modus barbara (hypothetical syllogism), modus tollens, reduction ad absurdum.
They are easy and I can help you with that. From here you could train your brains in expressing things the formal way, and draw conclusions from it.

- If you would like to learn to check how expressions are related, and if they are related, to eachother then learn the ways of discrete mathematics. Especially Venn diagrams. I can help you with that as well.

I'v mentioned three options. I suggest you learn them starting from below (discrete math).
__________________
Valmont is offline   Reply With Quote
Old 01-30-2005, 09:57 PM   #7 (permalink)
slashdot
Registered User
 
Join Date: Dec 2004
Posts: 43
slashdot is on a distinguished road
Man this is confusing, sry, I'm tired I need to go to bed. Soo.. before I go, heres a couple easier questions that anyone could understand. I'm reading C++ for dummies, I'm about a 3rd of the way through the book. I have to admit he is talking to me as if I were a college studen't, and he uses words that could very well easily be used by something else other then what he uses. Ex. Truncated - to cut off. Anyways, I am having an exceedingly difficult time reading this book, I understand what he is saying at sometimes during the book, and sometimes he totaly lost me. I keep going tho, knowing that I need to get back at those chapters I didn't fully understand. But now I am getting more and more lost. I need to say that this guy needs to be fired. So my questions are should I read more then one source of information on C++? Would that help me out a lot more? Where did you go to that you learned C++ from? Can you direct me to a source of good very nubish information? Thanx that would be a lot of help.
slashdot is offline   Reply With Quote
Old 01-31-2005, 04:09 AM   #8 (permalink)
fp_unit
mike
 
Join Date: Jan 2005
Location: Ottawa, ON
Posts: 79
fp_unit is on a distinguished road
Yes, you should absolutely be using more than one source for learning C++, at least in my opinion. Especially if you don't like the textbook your using, just remember all the C++ books (or at least a large majority) will use computer terminology to express points. You might as well get used to it now.

I highly suggest that you take notes by hand while reading a book on programming, especially while your learning. WRITE all the code (don't download it from their website or anything) and try hard to understand whats going on in every program. Once in a while jump a few chapters ahead and maybe write a bit of code from that chapter, see if you understand what it does. Read tutorials online (theres thousands, please dont ask where) and just try to read/write lots of code.

Also you should enjoy it. If you dont enjoy it, why are you learning? Hope that helped. And like Valmont suggested, try to speak in proper english, you'll get better answers to your questions and people will take you more seriously online.
fp_unit is offline   Reply With Quote
Old 01-31-2005, 05:33 AM   #9 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Quote:
Would that help me out a lot more?
Try the book:
"You can do it" from "Francis Glassborow".
http://eu.wiley.com/WileyCDA/WileyTi...470863986.html
Or preferably go to a more serious stage:
"Teach your self C++ in 21 days"
http://newdata.box.sk/bx/c/htm/ch11.htm
By it! Here is a sample, it is a famous book:
http://www.wargaming.net/Programming..._C_21_Days.htm

However, F.G. introduces STL in a early stadium so that programming with STL becomes a natural thing. That is good.
Quote:
So my questions are should I read more then one source of information on C++?
Eventually yes but not in the beginning. Later you should order the C++ Standard:
http://www.open-std.org/jtc1/sc22/WG21/
Quote:
Where did you go to that you learned C++ from?
CMG, Hewlet Packard, Packard Bell, Government...
Quote:
Can you direct me to a source of good very nubish information?
There is a plenty of source code for less seasoned coders. But I won't direct you towards it. I do not propagate bad code. 95% of the code on the net is rubbish. Why should I teach students to think wrong, and later try to learn them the basics of analisys and design? It is a contradiction. Teaching it the right way is my whole purpose and vision here.
Quote:
Thanx that would be a lot of help.
Help yourself and post code you don't understand. As long as it is clear what the OP wants, I *can* help.
As long as the OP is not lazy I *will* help. I do not get tired easely.
__________________
Valmont is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Entry Fields for One Database Field heartsoh HTML, XML, Javascript, AJAX 0 07-12-2004 08:54 PM
array pointer? Admin PHP 8 12-08-2003 03:51 PM
Java help?? d00ds?? zergmuncher Java 19 11-15-2003 02:35 AM
pointer to function with class? Kportertx Standard C, C++ 5 04-11-2003 05:12 AM


All times are GMT -8. The time now is 12:27 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting