• C

Memory allocation

   1)Whenever I used to allocate memory by declaring char *
and using faralloc , or malloc , etc , I will get a error
"Can't convert void * to char *" because as you know it is declared as void * malloc or faralloc in alloc.h.
  2) Please tell me how to develop a project in c (step by step). Because I tried to develop but when I used to build .prj file it give "Type name expected"
Who is Participating?

Improve company productivity with a Business Account.Sign Up

rbrConnect With a Mentor Commented:
You have to use a casting after malloc statement since malloc returns a void pointer

char *ptr;

prt=(char *)malloc (size);
manjuceeAuthor Commented:
Hi rbr,
                   Thanks for giving me a solution , I dont know how i forgot this simple logic.
manjuceeAuthor Commented:
Hi rbr,
           What about the second question that i have asked on creating a project in c.
Really I dont know how to do that one. I am facing lot of error message please guide me.
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Which compiler and OS to you use?
What have you done already in your project and which errors do you get?
manjuceeAuthor Commented:
Hi rbr,
                  It's Turbo C++ and OS is Windows NT 4.0
Here is the listing of .prj file
move  // driver program
It is giving "Type name expected" for all i.e., move, menu(),ibm.obj
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.