Hi
Could you explain a little about the topic?
thanks

And one more question.
How can i gain some information about ANSI/ISO c++ standard and the compilers that support it?
thanks again

Hi
but what's your problem?..

And one more question.
How can i gain some information about ANSI/ISO c++ standard and the compilers that support it?

Do it as usually: search Google ;)

From http://home.att.net/~jackklein/c/standards.html:

Warning! What C and C++ standards are not!
The actual ANSI/ISO/IEC standards documents are not tutorial in nature or easy to read. They contain very dense and detailed technical information. They are not recommended as a guide for learning to program in the languages, or for beginners in general.

Compilers: it depends on your platform.

You can of course return pointer to any object via function.
The syntax is pretty much intuitive:

returnType* myFunc(argType1 arg1, argTyp2 arg2.......)
//example
int* someFunct(int a, int b){}
char* someFunct(char* A, int Len)

Now, stand up dude, do some Google search and you will find much more than this.

>>How can i gain some information about ANSI/ISO c++ standard and the compilers that support it?
thanks again
By googling it. What info do you want. The complete standard? It is not free though. http://www.parashift.com/c++-faq-lite/big-picture.html#faq-6.13

To ArkM:
I know i must write sth like this in the prototype:

int *func()

but i don't know what should write after the return command.I tried return *s,&s,s but all of them ware wrong.
To siddhant3s:
I wanna program in standard c++ so i must know what should i do for that.
for example which headers must not have .h extension in the #include statement .
and a little part of reason is that i'm a little curios about it.
thanks again

What's this s - that is a question ;)

Come on man,I considered c++ programmers smarter.
its just an example of a pointer.

Come on man,I considered c++ programmers smarter.
its just an example of a pointer.

They're also smart, but if you aren't giving any detailed information about your problem we can only guess about it ...

If you do a quick google search you can find it within exactly 2 seconds, so try doing this before you post ...
(You might consider looking at this link: http://java.functionx.com/cpp/examples/returnpointer.htm)

>Come on man,I considered c++ programmers smarter.
In my experience C++ programmers are just like everyone else: the majority are slightly below average, a smaller number are average or just above, there are enough retards to frighten you, and a handful are truly brilliant.

By the way, you're not that bright yourself if you think that we're mind readers.

>i don't know what should write after the return command.
You return a matching type:

int *function()
{
  int *p;

  // ...

  return p;
}

>I wanna program in standard c++ so i must know what should i do for that.
Best of luck. You'll need a copy of the standard and plenty of time on your hands. Alternatively you could simply buy a book like Accelerated C++ and learn C++ correctly from the start. That will get you going on the correct path.

>which headers must not have .h extension in the #include statement
All of them. The correct headers specific to C++ have no .h extension and the correct headers inherited from C replace the .h extension with a c prefix (eg. <string.h> becomes <cstring>). You shouldn't be using the .h versions of the inherited headers. They're only supported for compatibility.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.