News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

codeblocks not recognizing tolower()

Started by Buip1974, May 25, 2010, 02:03:57 PM

Previous topic - Next topic

Buip1974

Hi everyone,

I am new to programming and trying to learn c. Code::Blocks was recommended to me but I am having trouble accessing help. I try to compile and run the code below but Code::Blocks says error 'tolower' was not declared in this scope.

#include <stdio.h>
{
    int c;
    while((c=getchar()) != EOF)
         putchar(tolower(c));
    return 0;
}

I have searched the net and as far as I can see tolower() is part of the standard library and therefore should be included in the stdio.h header file. But Code::Blocks does not recognize it. I try to highlight the word and press F1 but nothing, I look at the help menu but there is no help file on what functions I can use and what parameters they expect. I am sorry to be so new at this but am I missing something, like something I need to install, where are the help files.

Regards

Pieter

MortenMacFly

Quote from: Buip1974 on May 25, 2010, 02:03:57 PM
I am sorry to be so new at this but am I missing something, like something I need to install, where are the help files.
Sorry, but your question is completely out of the scope of this forum. Please try a C/C++ related forum as we don't support general programming questions. This forum is about the development of Code::Blocks which is an IDE, not about compiler/linker/programming issues.

Short note: Don't mix C and C++ code. tolower most likely is C++ (coming from STL) but you are using C headers/code. Not sure what exactly you want to do, but please grab yourself a C / C++ beginners book and start reading a little.

Topic locked.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]