oh yeah its namebuffer instead of litsname
I defined it like namebuffer[max][maxname];
Type: Posts; User: gamers18
oh yeah its namebuffer instead of litsname
I defined it like namebuffer[max][maxname];
so you mean something like..
listname[max][maxname];
strcpy(namebuffer,listname[0]);
for(i = 0; i < counter; i++)
{
basically i an store names into an array ..listname[max][maxlength]
but these names are stored in each array. I am trying to print all these names into 1 line of string
I tried
for(i = 0;...
Hi,
I managed to store names into listofnames.. how can I print the listofnames array into 1 string?
Hi, I am having trouble storing strings into an array. Basically I have a console program where it has an option.
This is just an example;
char name[max];
char listofnames[maxname];
int...
I am trying to insert spaces in string
for example:
string = "hellohowarejames"
i woud like to insert a space for every 4 letters
so it will look like
bacically im trying to shift chars in an array inside a function..
char *shifter(int numOfShifts)
{
char arr[] = "abcdefghijklmnopqrstuvwxyz";
...
shifting
...
ive been trying to return a sorted array elements but its only returning the half of the array. any ideas why?
is there something else than that? like directly shifting letters from one end to the other?
what is the easiest way to shift array "abcdefg" to "defgabc"?
Im trying to compare a single char to an array of chars like for example
char input[100];
char notValid[20] = {'A','B','C'}
..
cin << input
..
its what posted on the top. I tried to implement it like that ..readline() is like fgets() so no code implementation
Hi i tried this actually
while((bufline = readline("mysh$ ")) != NULL)
{
numArgs = parseBufline(bufline,args," ");
printf("args[0]: %s\n",args[0]);
}
I have a while loop here
while(1)
{
bufline = readline("myshell$ ");
sprintf(buffer,"%s",bufline);
numArgs = parseBufline(buffer,args," ");
//printf("args[0]:...
How can I store user input strings into an array of strtok()?
I am trying to read user input from the terminal. If I enter "one two three four", how can I store these strings into argvs like argv[0] == one, argv[1] == two, argv[2] == three, argv[3]== four .....
so for example i typed "Hello World" .. how can I divide the buffer to say ..argv[0] is Hello and argv[1] is World ....or divide it by number of argc
I am using readline() to get input from a console. I am saving the input strings into a char variable. Then i sprintf the char varible into a buffer by using sprintf(). How can i divide the buffer...
lets say I used strtok to divide this line of strings. how can i assign each string to a variable? like string1 = This, string2 = is, string3=me
How can I divide the input string of readline()? For example in cosole i typed "This is me".
How can I divide this to
readline() string 1 = This
readline() string 2 = is
readline() string 3...
that make sense. tnx i will try this
I am trying to make a program that can scan a folder, and then list all files that starts with a number. Please help
I am trying to base my idea in this example code.
int main(void)
{
DIR...