Skip to content
Sign upLog in
← Back to Community

Code is glitching when trying to run

Profile icon
kylep3

Using a Buddys cold to hopefully implement my own woks too it but every time I run it the image files on the code look glitch

Voters
Profile icon
Codemonkey51
Comments
hotnewtop
Profile icon
kylep3

Its confusing almost I'm much of a coder.. is it possible I can share it with you and you help me fix it. I'm just lost cause his works perfectly find with f1>>> screen[row][col]

Profile icon
mwilki7

have you tried using f1.getline()?

for (int row = 0; row < HEIGHT; row++) { f1.getline(screen[row], WIDTH); }

By inspection, f1>>screen[row][col]; looks like it's trying to fit an entire line into a single char, which will probably overwrite everything after it. Which would explain the glitchyness.

http://www.cplusplus.com/forum/general/179626/

Profile icon
kylep3

any suggestions on how to fix

Profile icon
ZacPlayz

The weird glitchy output that is displayed may come from a parallel connection with Java Swing package

@kylep3

Profile icon
mwilki7

@ZacPlayz

but this is a c++ repl

Profile icon
ZacPlayz

I know... Its weird but the question marks that glitch around are actually unidentified symbols of the language.

@mwilki7