syedshan
Advanced Member level 1
- Joined
- Feb 27, 2012
- Messages
- 463
- Helped
- 27
- Reputation
- 54
- Reaction score
- 26
- Trophy points
- 1,308
- Location
- Jeonju, South Korea
- Activity points
- 5,134
Hello all,
I am completely new to the practical programming of C
I have done C-programming during my undergraduate 2 years ago, now that I have to reuse it in one of my program I have restarted its revision...
I have problem with the Pointers to C, as we know that declaring char *p; would create a string pointer.
Hence I typed in the following code and compile it using Visual studio 2010
I am having following error (please see the image as well) "The Variable pta is being used without initialization"
I am completely new to the practical programming of C
I have done C-programming during my undergraduate 2 years ago, now that I have to reuse it in one of my program I have restarted its revision...
I have problem with the Pointers to C, as we know that declaring char *p; would create a string pointer.
Hence I typed in the following code and compile it using Visual studio 2010
Code:
#include <conio.h>
#include <stdio.h>
#include <iostream>
int main(void)
{
char *pta;
puts("Enter name : ");
scanf("%s",pta);
// gets(name); // I also tried this thing with gets() as well
}
I am having following error (please see the image as well) "The Variable pta is being used without initialization"