| | |
bitmap
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2008
Posts: 9
Reputation:
Solved Threads: 0
i have here this constructor used 2 display a bitmap
i have here this invert function which is meant to make the 0's into 1's and the * into " " but it is not working proply can ne1 help me
C++ Syntax (Toggle Plain Text)
void bitmap::display() const { for (int r = 0; r < numrows; r++) { for (int c = 0; c < numcols; c++) { if (grid[r][c] == 0) cout << " " ; else cout << "*"; } cout << endl; } }
C++ Syntax (Toggle Plain Text)
void bitmap::invert() { for (int r = 0; r < numrows; r++) { for (int c = 0; c < numcols; c++) { if (grid[r][c] = 1) { grid[r][c] = 0; cout << "*"; } else{ grid[r][c] = 1; cout << " "; } } } }
![]() |
Similar Threads
- Can't load bitmap resource into Image List (C)
- How do I convert a PrintDocument to a Bitmap? (VB.NET)
- Drawing bitmap on window - how to clear window/HDC? (C)
- RLE with a grayscale bitmap (Java)
- Changing a bitmap to a vector image .eps format (Graphics and Multimedia)
- coverting a Bitmap from colour format to greyscale (C++)
- Only saves to Bitmap (Windows NT / 2000 / XP)
- Using an Array to declare multiple bitmap handlers (C)
- Displaying a different bitmap in different child windows? - win32 in C (C)
- IE "Save Image as;" Bitmap, wont in JPEG??? (Web Browsers)
Other Threads in the C++ Forum
- Previous Thread: File permission
- Next Thread: VC++6.0 How retrieve current row in a *.DOC file?
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph gui homeworkhelp iamthwee ifstream image input int java lib library list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






