mm sorry about that
Type: Posts; User: everyone0
mm sorry about that
try it on a compiler, it gives me an error at the line puts(string[0]);
invalid conversion from a char to const char !!! i dont have a clue about the problem.
#include <stdio.h>
#include <conio.h>
#include <string.h>
main()
{
char string[20];
gets(string);
puts(string[0]);
getch();
}
well i tried that lol , it doesnt
Hi all programmers :), i was wondering if i read a string and then i was trying to print the first letter of that string what am i supposed to do ?
actually yea im working on several programs at the same time so i check once and a while , the second suggestion worked laserlight , thanks , i guess i won't have to ditch my compiler lol.
tried to figure it out :( , this is killing me can't find a single problem with the function and still gives me same error
yep its borland mm , i did add a ; before the } but still having same problem
what does (6,8) declaration terminated incorrectly mean ?
but thats not a prototype thats the function itself
hi guys , this is a program to read string S1 ,go to index k, and delete the
char located in index k. but its giving me an error that declaration terminated incorrectly could anyone help me plz ?...
wow i feel stupid! thanks for the help
well i corrected the code as u said but now it says ambiguity between the function and the way im calling it
#include <string.h>
#include <stdio.h>
#include <conio.h>
char *(strchr)(const char...
still same problem when i turned it back to char*
hi, i wrote the strchr function in a full program but there is something wrong when calling the function and it gives me an expected error , here is the code :
#include <string.h>
#include...
giving me an expected error
#include <string.h>
#include <stdio.h>
#include <conio.h>
void strchr(*s, char c)
{
while (*s != '\0' && *s != (char)c)
s++;
return ( (*s...
mm thanks , the instructor definitely did not tell me that :)
could someone put a main function in the code so i can trace it and try to get it myself ?
hey guys , this is the strchr function , i was wondering what does that return at the end of the code do ? i can't really understand it , what does the '?' sign do ?
#include <string.h>
/*...
mm thanks for the help
any other ways than using a flag variable ?
ok thanks for the help , will do
hey guys , i was wondering if u could tell me a few ways to find if a certain element(no,char,or whatever) exists in an array or not.
ex: i enter 10 elements in an array through a for loop then how...
ops forgot to initialize sum=0
i wrote this code it prints average ,min,max in array but the problem is that the average doesn't print correctly . help plz
#include <stdio.h>
#include <conio.h>
void func(int A[],int size,int...