Author Topic: Probelms with character variable  (Read 3746 times)

bstaletic

  • Guest
Probelms with character variable
« on: March 15, 2014, 08:55:25 pm »
Hello everyone,
I recently started programing in C, and I use code::blocks to satisfy my needs.
When I use scanf to asign a character to a variable, and than printf to check if all went fine, it just show blank.
The same is when I use printf to display character that has not been entered, but this is expected.

I uploaded the siplest code where I could encounter this problem. If I made a mistake in code please tell me, if not what is the problem?
« Last Edit: March 15, 2014, 09:09:22 pm by jens »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Probelms with character variable
« Reply #1 on: March 15, 2014, 09:08:48 pm »
Please (re-?)read the rules.
When registering here you accepted to follow these rules !!
This post is here to assist you in your Code::Blocks / C++ blues, by telling you what NOT to do. This is not to frighten you, but unfortunately we have to be that strict due to continuous mis-use and dis-respect.

1. This is NOT a general programming board. "How do I write a program that....", "Can anybody teach me how to", "I have this homework", "My program doesn't run and I don't have the slightest idea of why because I'm a C++ newcomer", "What is a compiler", "What does gcc do" is the kind of questions that is FORBIDDEN to ask.
[...]
Finale note: Ignoring these rules may result in the topic being (silently) locked and/or even removed completely without any notice.

In case you wonder why we are so strict: I could say: "Search the forum" - as this has been discussed a lot. To make is short: By law we (the devs/moderators) are responsible for the content of our forum. This means we need to read all posts. If you want us to continue the development of C::B and have the time to answer some of the questions that are really related to C::B, apply the rules above. It's obviously a matter of time for us.

More general help how to use our forum you'll find here, too.

Topic locked and attachement deleted !