r/VisualStudioCode • u/Postmodern_marxist • Feb 11 '22
Very new at this
Hi everyone,
I've just started the book c language for dummies and I'm trying to convince myself that programming is not out of reach which I starting to believe that maybe it is... Anyway, I use Visual Studio Code for my exercise and I'm now learning about the input and output and the getchar function. When I try to run the program:
#include <stdio.h>
int main() {
int c;
printf("I'm waiting for a character: "); c = getchar(); printf("I waited for the '%c' character.\n",c); return(0);
}
I then get a text file that can't be read and it says: the file is not displayed in the editor because it is either binary or uses an unsupported text encoding. I tried to download the hex editor but from that, I get only the binary (yep). I'm suppose to get a text that says :
I'm waiting for a character: C
I waited for the 'C' character.
Please help a brother that is kind of ridiculing himself in front of the encouragement of its wife.
Cheers!
View all comments
Show parent comment
2
u/mainstreetmark Feb 12 '22
Everything seemed so cryptic at first to everyone providing you answers in this sub. This is your first step. You have everyone's support.
However, at this point, I should point out that this sub is for the editor you use, and not necessarily the code you're writing. Reddit has a lot of really good support subs, and for you, perhaps r/cpp. This sub is for support in using VSCode and its various plugins and configurations. VScode is the "tool", C++ (aka cpp) is the language.
Good luck on your journey. It's harder than you think it will be, but also shapes your problem solving skills and views of the world. I couldn't be happier as a professional programmer.