For some odd reason when I try to display the text in the canvas, it'll omit the second portion of the text( i.e Fox Trot = will only show Fox, instead of Fox Trot ).
The code is below; any help will be much appreciated; Thank you.
#include <iostream>
#include <Simple_window.h> // A plain window with the "Next" button
#include <Graph.h> // A header with access to our graphics library facilities
usingnamespace Graph_lib; // Our graphics facilities are in Graph_lib
usingnamespace std;
int main()
{
Point t1(100,100); // top-left corner of window
Simple_window win(t1,600,400,"Canvas");
// screen coordinate tl for top-left corner
// window size(600*400)
// title: Canvas
string user_name;
cout << "Please input your full name: ";
cin >> user_name;
Text t(Point(150,150), user_name); // location of where user_name
// will be displayd in the window
t.set_font(Graph_lib::Font::times_bold);
t.set_font_size(20);
win.set_label("Project 1a");
win.attach(t); // attach the cin of the user to the window win
win.wait_for_button(); // give control to the display window
}
#include <iostream>
#include <Simple_window.h> // A plain window with the "Next" button
#include <Graph.h> // A header with access to our graphics library facilities
usingnamespace Graph_lib; // Our graphics facilities are in Graph_lib
usingnamespace std;
int main()
{
Point t1(100,100); // top-left corner of window
Simple_window win(t1,600,400,"Canvas");
// screen coordinate tl for top-left corner
// window size(600*400)
// title: Canvas
string user_name;
cout << "What is your name? ";
getline(cin,user_name);
Text t(Point(150,150), user_name); // location of where user_name
// will be displayd in the
// window
cout << "Click the ""Next"" button to quit\n";
t.set_font(Graph_lib::Font::times_bold);
t.set_font_size(20);
win.set_label("Project 1a");
win.attach(t); // attach the cin of the user to the window win
win.wait_for_button(); // give control to the display window
}