mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-03-20 03:45:25 +08:00
10 lines
184 B
C++
10 lines
184 B
C++
#include<iostream>
|
|
using namespace std;
|
|
|
|
|
|
int main(){
|
|
const int p = 10;
|
|
// const void *vp = &p; // const pointer to const data
|
|
void *vp = (void*)&p; // ✅ C-style cast
|
|
}
|