P
parag_paul
I have a non member function , which has a prototype
const print() const{
What could be the purpose of the same?
const print() const{
What could be the purpose of the same?
I have a non member function , which has a prototype
const print() const{
What could be the purpose of the same?
[email protected] said:#include<iostream>
using namespace::std;
const void print () {
cout << " wow "<< endl;
}
int main(){
print();
return 0;
}
But I compile the above with g++ 3.6 and it does work for me.
without any warnings. i think we might have misunderstanding
-Parag
I have a non member function , which has a prototype
const print() const{
What could be the purpose of the same?
I am sorry about the const modifier declaration after the method.
This was not intended. I am talking about the initial one
#include<iostream>
using namespace::std;
const void print () {
cout << " wow "<< endl;
}
int main(){
print();
return 0;
}
But I compile the above with g++ 3.6 and it does work for me.
without any warnings. i think we might have misunderstanding
template said:> T const f( T* p ) { ... } ;
Call this function with a void const*, and it will return a void
const.
template< typename T >
T const f( T* p ) { ... } ;
I dont understand the above,
int const f(int* p)
How to call this with a void const * , I also have never
seen a const*
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.