| | |
C++
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Feb 2008
Posts: 2
Reputation:
Solved Threads: 0
k hi every1, im kinda new to C++, anyways..this is an assignment for my college.
im supposed create a program that displays the username in a "creative" way.
so first thing is do i use the get and ignore functions to get the initial if the user enters the whole name?
and if so then how do i display the name creatively?k does anyone know how to display a letter with '*'s? for example, say the letter C
*********
*
*
*
*
*********
im supposed create a program that displays the username in a "creative" way.
so first thing is do i use the get and ignore functions to get the initial if the user enters the whole name?
and if so then how do i display the name creatively?k does anyone know how to display a letter with '*'s? for example, say the letter C
*********
*
*
*
*
*********
Last edited by shamin; Mar 16th, 2008 at 1:17 am.
•
•
Join Date: Dec 2006
Posts: 1,089
Reputation:
Solved Threads: 164
> how to display a letter with '*'s? for example, say the letter C
something like this, perhaps?
something like this, perhaps?
c++ Syntax (Toggle Plain Text)
#include <iostream> enum { HEIGHT = 8, WIDTH = 8 }; const char* const C_bitmap[HEIGHT] = { "********\n", "********\n", "**\n", "**\n", "**\n", "**\n", "********\n", "********" }; int main() { for( int i=0 ; i<HEIGHT ; ++i ) std::cout << C_bitmap[i] ; std::cout << '\n' ; }
•
•
Join Date: Dec 2006
Posts: 1,089
Reputation:
Solved Threads: 164
> when i compile no errors but wen i build it i get 4 errors!
what are the errors? and which compiler are you using?
> if i want to hav the letter D il have to do the whole "*********\n", "** **\n", ..... thing is it??
yes, you need one pattern for each letter. and a look-up mechanism to get to the right pattern given a particular letter.
> im a super beginner!
perhaps you could attempt something simpler. eg. display a name like this:
what are the errors? and which compiler are you using?
> if i want to hav the letter D il have to do the whole "*********\n", "** **\n", ..... thing is it??
yes, you need one pattern for each letter. and a look-up mechanism to get to the right pattern given a particular letter.
> im a super beginner!
perhaps you could attempt something simpler. eg. display a name like this:
C++ Syntax (Toggle Plain Text)
*********************** * * * Aureliano Buendia * * * ***********************
![]() |
Other Threads in the C++ Forum
- Previous Thread: Search string?
- Next Thread: random function in c++
| Thread Tools | Search this Thread |
Tag cloud for C++
api array arrays based beginner binary bmp c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete deploy directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib library lines linkedlist linker list loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference return simple spoonfeeding string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






