Pointer to Pointer

R

rkldabs

Hi,

Which portion of the C++ standard contains reference to the fact that
the following code is ill-formed?

#include <iostream>
using namespace std;

struct base{};
struct derived : base{};

void fn(base **p){}

int main(){
derived d;
derived *p = &d;
fn(&p);
}

Regards,
Dabs
 
I

Ioannis Gyftos

* Alf P. Steinbach:


Oh sorry all, I answered a homework question.

I'd find it really weird if any teacher would ask me to find
references to the C++ standard. (And you have to pay to get it, don't
you? Except for an old draft version, iirc.)
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top