This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Twix | |
Fido | |
John | |
Smith | |
47 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
237.87 | |
9.52 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 | |
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
// Initializing variables. '?' means you should insert the correct type | |
// identifier. | |
? a = 42; | |
? b = false; | |
? c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
// Remember to include cmath for math functions | |
#include <cmath> | |
using namespace std; | |
int main() { | |
// Most math functions deal with doubles so we might as well make it easy. | |
double leftOperand = 0.0, rightOperand = 0.0; | |
double result = 0.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
// In programming, a sentinel value is a special value that guarantees | |
// loop termination when seen. In this example, we use 'q' to represent quit. | |
const string SENTINEL = "q"; | |
string userInput = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
string twoCharInput = ""; | |
string fiveCharInput = ""; | |
string tenCharInput = ""; | |
// Make user continue entering word until it is the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX=g++ | |
CXXFLAGS=-g -W -Wall -Werror | |
OBJECTS=book.o library.o point.o rectangle.o | |
MAIN=main.cpp | |
all: $(OBJECTS) | |
$(CXX) $(CXXFLAGS) $(MAIN) $(OBJECTS) | |
rectangle.o: point.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "rectangle.h" | |
#include "point.h" | |
int main() { | |
Point p; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX=g++ | |
CXXFLAGS=-g -W -Wall -Werror -pedantic -ansi | |
OBJS=person.o | |
MAIN=main.cpp | |
all: $(OBJS) | |
$(CXX) $(CXXFLAGS) $(MAIN) $(OBJS) -o mytwitface | |
person.o: person.h person.cpp |
OlderNewer