Question: Everytime i code for this project i get the segmentation fault ( code dumped ) PLEASE HELP The purpose of this project is to write
Everytime i code for this project i get the segmentation fault code dumped PLEASE HELP
The purpose of this project is to write programs using arrays to initialize them, modify them and write them to a file. We discussed in class how to create a ppm image using a threedimensional array of type uintt Our image displayed the characters UNT in green color with a white background. The image size was pixels. In this project you will create a similar image of size pixels where is the width and is the height in pixels. In the top half of the image, you will display CSCE and in the bottom half of the image you will display UNT.
Center each text in their respective half horizontally. The vertical spacing between characters should be pixels and the vertical spacing from characters to the top and bottom edges of the image as well as to the horizontal line in the center of the image should be pixels. The horizontal spacing between the left and right edges and the fop line of characters should be pixels. The horizontal spacing between the left and right edges and the bottom line of characters should be at least pixels. The horizontal spacing between characters should be pixels.
All the above specifications mean that the height of each character would be pixels. The top line of characters would be vertically centered on row and the bottom line of characters would be vertically centered on row You can choose the width of each character while making sure that the horizontal spacing between characters is pixels.
Color each character randomly. Use the same random color for every pixel in a character.
Use a threedimensional array for handling the top half of the image. Use a threedimensional vector for handling the bottom half of the image.
The following function prototypes should be used and the corresponding functions be defined and called from main.
initialize top half of the image with a white background
void initializeTopHalfuintt arrmaxr const int maxc, const int maxr;
initialize bottom half of the image with a white background
vector initializeBottomHalf int maxc, const int maxr:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
