can anyone show me how to write the letter D for the block letters project im having a lot of trouble doing this.
What are the dimensions? 5 wide and 7 high?
yes exactly. i will not let me post what i have here but its kind of like this.
#include iostream
int main() {
a
Std::cout <<“DDDD \n”;
Std::cout <<“D D \n”;
Std::cout <<“D D \n”;
Std::cout <<“D D \n”;
Std::cout <<“D D \n”;
Std::cout <<“D D \n”;
Std::cout <<“DDDD \n”;
return 0;
}
int main() {
// d
std::cout <<“DDDD \n”;
std::cout <<“D D \n”;
std::cout <<“D D \n”;
std::cout <<“D D \n”;
std::cout <<“D D \n”;
std::cout <<“D D \n”;
std::cout <<“DDDD \n”;
return 0;
}
Question, does cout
not have a linebreak (newline)?
edited to correct code as advised below
not really sure this the error im getting.initials.cpp:8:1: error: ‘Std’ has not been declared
Std::cout <<“D D \n”;
^~~
initials.cpp:9:1: error: ‘Std’ has not been declared
Std::cout <<“D D \n”;
^~~
initials.cpp:10:1: error: ‘Std’ has not been declared
Std::cout <<“D D \n”;
^~~
initials.cpp:11:1: error: ‘Std’ has not been declared
Std::cout <<“DDDD \n”;
TBH, I’m not C++ savvy. Going to tag in another member: @midlindner is more familiar/adept at this language.
no problem thanks for trying to help.
cout does not have a line break. There’s an std::endl
but that flushes the stream so it has more overhead than \n
std::cout
should be lower case, you wrote Std::cout
OMG yeah changing the S worked lol thanks so much for the help