Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
#include
#include
using namespace std; int main() { string food = "Pizza"; // A string variable string* ptr = &food; // A pointer variable that stores the address of food // Output the value of food cout << food << "\n"; // Output the memory address of food cout << &food << "\n"; // Output the memory address of food with the pointer cout << ptr << "\n"; return 0; }
Pizza
0x6dfed4
0x6dfed4