mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-03-19 19:35:17 +08:00
9 lines
179 B
C++
9 lines
179 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
|
|
}
|