Hello again
I was trying for a while understading but i can't figured it out.
When i get this code
char op[]="cr test";
//teste(op);
char **comando=teste(op);
Type: Posts; User: HIT_Braga
Hello again
I was trying for a while understading but i can't figured it out.
When i get this code
char op[]="cr test";
//teste(op);
char **comando=teste(op);
Thks vart i'm noob sorry.
just a simple * :( dahhh
Hello again.
Can help me :(
#include<stdio.h>
#include<stdlib.h>
char** teste(char* s)
Hello
Thanks for the help people.
The code is working great but just one thing.
#include<stdio.h>
#include<stdlib.h>
char* teste(char* s)
{
Hello.
I need to return the array to my main function, but i can't get it working.
Can some one help me.
char teste(char s[])
{
char *tok[3], *p;
int i;
Thanks tabstop.
That the way i already do the job.
I just was looking for an better way. I don't really know if argv and argc can be used in readline.
Thanks anyway
Yes Adak.
When i run my program the prompt changes to Letters, because i'am using readline.h
After the user should give me some comands that my program executes, but i want to check how many args...
Yes DeadPlanet i know that also.
But my program stays always with the prompt of readline "Letters:>" and i need to count argc in this.
If i put ./Letters testing, argc will be 2 and so on....
Here is an sample example.
#include<stdio.h>
#include <readline/readline.h>
#include <readline/history.h>
int main(int argc,char *argv[])
{
char *s;
s = readline("Letters>");
I know i can use argc to know the number of args. But i already try to put like so many examples over internet and always count wrong args.
Hello again :)
Is possible to know how many args has been introduced by the user, without making any functions to do that, simple using my code:
char *s ;
int n = 0, q = 0 ;
int x,y;...
Hello nonpuz.
Thanks for the help...it's working great.
I changed a little because it was very advanced for me, but i got the idea so it was easy to change.
Thanks again.
My problem is that pch will have at first time an letter so is digit will work fine, but next time will have numbers, and i can figured out how i will do the job so it will works for everithing....
Hello.
Can some one help me, using strtok and some checks.
int num_args()
{
int numero=0,size=0
char op[20]="p 1 1",char op1[20]="p 10 20";
char *pch;
Hello.
I have um simple program that just count how many args are introduced by user.
Example: insert 20 30 should say 3 args. The problem is i can count the args correctly but one of my...
If i replace
char tam[10]={ };
fgets(tam,5,fp1);
i got this output:
Hello.
I have the following code to read one file.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main()