473,569 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

function Declaration&Def inition

1 New Member
function Declaration&Def inition
--------------------------------------------------------------------------------

" Geroty (const vector<Point3D> & poly, const Plane& Tr)"

As i'm c++ beginner the following Function Declaration and Definition couldnt understandable? so explain me what kind of Declaration this is."const vector<Point3D> & poly....." ? and where do I find study materials for the kind of function declaration"

Also pleas explain *this without more complex technical terms.
Jun 24 '07 #1
1 1331
weaknessforcats
9,208 Recognized Expert Moderator Expert
const vector<Point3D> &

is a reference to a vector containing Point3D objects. The const means the container is constant. That is, you can access the objects inisde but you can't change them.

vector is a C++ Standard Library container.

Find out about vector and references in any C++ textbook.

*this is the object pointed at by the this pointer. this pointers are used in member functions to access the object being used by the member function. Again, you will need to read up on classes and member functions in a C++ textbook.

I recommend the "C++ Primer Plus" 5th Ed. by Stephen Prata. This one is non-technical and assumes you know nothing. I would make a serious attempt to read this book.

There are also C++ classes offered where this material is covered. Check your local colleges.
Jun 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4261
by: qazmlp | last post by:
// test.h class test { public : inline void check() ; } ; // test.C inline void test::check() // Is 'inline' optional here?
28
15337
by: Michael B. | last post by:
I tend to use rather descriptive names for parameters, so the old style of declaration appeals to me, as I can keep a declaration within 80 chars: void * newKlElem (frame_size,num_blocks,num_frames,frame_locator) size_t frame_size; unsigned short num_blocks; unsigned short num_frames; Kl_frame_locator *locator; { /* code goes here */
4
13214
by: thinktwice | last post by:
i have just made a test project :(win32 console) //file : func.h #ifndef _FUNC_H_ #define _FUNC_H_ void func1() { return; };
10
2593
by: Eric | last post by:
Hello, I have been working through the K&R book (only chapter one so far) examples and exercises. After much sweat and hair pulling, I think I have a solution for ex 1-18 on page 31. It seems to work but may be missing some error checking. Can you please take a look and see if my logic is correct and any other improvements. This is...
3
4580
by: arnuld | last post by:
1) int i = 3; 2.) int* pi; 3.) int* pi2 = &i 4.) char* pc; 5.) char c; 6) char c2 = 'a' 7.) char* pc2 = &c2 8.) char* ps = "Stroustroup"; 9.) extern double d;
13
3021
by: Old Wolf | last post by:
I have some code that has in the header file: void foo( char bar ); and in the source file: void foo( bar ) char bar; { /* etc. */ } The compiler (with many warnings enabled) warns that the
1
1095
by: Prabu Ramasamy | last post by:
As i'm c++ beginner the following Function Declaration and Definition couldnt understandable? so explain me what kind of Declaration this is......? especially X& refers what? Here instead of datatype X& is used. why? Declaration : private: int len; char *ptr;
2
1624
by: hellori | last post by:
Hi all, I have a question about passing iterators to a function. I want to create a function that does something with STL container iterators. The container of the iterator can vary, so I use a template container there. Here is the code: template <class Container, class T> void do_sth(typename Container<T>::iterator &start, typename...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.