This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ...was not declared in this ambit


David Sveningsson wrote:

> Have you included <memory>? Otherwise it works for me.

Thanks. I have included <memory> but the error is the same...

GARFF




David Sveningsson-3 wrote:
> 
> tirengarfio skrev:
>> H,
>> 
>> when i try to compile the main.h file below it says:
>> 
>> "p_open was not declared in this ambit." 
>> 
>> any idea?
>> 
>> 
>> ###########main.c############
>> 
>> #include "estructuras.h"
>> 
>> main(int argc, char *argv[])
>> 
>> {
>> 
>> char *comando;
>> openCmd_t *p_open;
>> ...
>> memcpy(comando, p_open, sizeof (*p_open));  /////////// error line
>> 
>> 
>> }
>> 
>> #######estructuras.h#########
>> 
>> 
>> struct openCmd_t {              
>>          char username[20];
>>          char password[20];
>> };
>> 
>> 
>> 
>> 
>> br.
>> GARFF
> 
> Have you included <memory>? Otherwise it works for me.
> 
> Also try setting LANG and LC_ALL to "". Translations of your
> errors/warnings might be wrong. Has happened me a couple of times. Eg
> 'LANG="" LC_ALL="" g++ foo.cpp'. The real error seems to be "'memcpy'
> was not declared in this scope".
> 
> 
> -- 
> 
> 
> //*David Sveningsson [eXt]*
> 
> Freelance coder | Game Development Student
> http://sidvind.com
> 
> Thou shalt make thy program's purpose and structure clear to thy fellow
> man by using the One True Brace Style, even if thou likest it not, for
> thy creativity is better used in solving problems than in creating
> beautiful new impediments to understanding.
> 
> 

-- 
View this message in context: http://www.nabble.com/...was-not-declared-in-this-ambit-tf4765631.html#a13635395
Sent from the gcc - Help mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]