Here is the output from the code below:
1
1
I can't figure out how to display the memory address.
//---------------------------------------------------------------------------
#include "mariamole_auto_generated.h"
//---------------------------------------------------------------------------
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
http://arduino.cc
This example code is in the public domain.
modified 8 May 2014
by Scott Fitzgerald
*/
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(9600);
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop()
{
int teeny;
int *t;
teeny = 1;
t = &teeny;
Serial.println(teeny);
Serial.println(t);
Serial.println(*t);
Serial.println("----");
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
The error is, "Pointer_1.cpp (36): call of overloaded 'println(int*&)' is ambiguous"
The output is:
Detecting undeclared functions in main project file: Pointer_1.cpp...
Compiling file: /Pointer_1/source/Pointer_1.cpp
C:/Program Files (x86)/MariaMole Beta/arduino/hardware/tools/avr/bin/avr-g++ -c /Pointer_1/source/Pointer_1.cpp -o /Pointer_1/build/source_Pointer_1.cpp.o -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -MMD -DARDUINO=105 -mmcu=atmega328p -DF_CPU=16000000L -I /Pointer_1/source -I C:/Program Files (x86)/MariaMole Beta/arduino/hardware/arduino/cores/arduino -I C:/Program Files (x86)/MariaMole Beta/arduino/hardware/arduino/variants/standard
/Pointer_1/source/Pointer_1.cpp: In function 'void loop()':
/Pointer_1/source/Pointer_1.cpp:36: error: call of overloaded 'println(int*&)' is ambiguous
C:/Program Files (x86)/MariaMole Beta/arduino/hardware/arduino/cores/arduino/Print.h:70: note: candidates are: size_t Print::println(char)
C:/Program Files (x86)/MariaMole Beta/arduino/hardware/arduino/cores/arduino/Print.h:71: note: size_t Print::println(unsigned char, int)
C:/Program Files (x86)/MariaMole Beta/arduino/hardware/arduino/cores/arduino/Print.h:72: note: size_t Print::println(int, int)
C:/Program Files (x86)/MariaMole Beta/arduino/hardware/arduino/cores/arduino/Print.h:73: note: size_t Print::println(unsigned int, int)
C:/Program Files (x86)/MariaMole Beta/arduino/hardware/arduino/cores/arduino/Print.h:74: note: size_t Print::println(long int, int)
C:/Program Files (x86)/MariaMole Beta/arduino/hardware/arduino/cores/arduino/Print.h:75: note: size_t Print::println(long unsigned int, int)