Hi! I'm trying to call another c program via shell script in c, but it just pop-up and close again.. here's my code:
char* command = "";
char temp[MAX_LENGTH] = "";
...
Type: Posts; User: programmerc
Hi! I'm trying to call another c program via shell script in c, but it just pop-up and close again.. here's my code:
char* command = "";
char temp[MAX_LENGTH] = "";
...
Thanks, @zyxwvuts for the answer.
It's not exactly want I but, your answer help to solve my problem. Thanks :)
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const *argv[]) {
system("gnome-terminal");
printf("Hello World!");
Hi! I'm trying to implementing shunting yard algorithm and I'm done converting it to postfix. I have some problem on evaluating it.
Here's my code:
Tree* evaluateExpr(Tree** right, Tree**...
Okay, thanks..
Yes.
Can I evaluate it with this expression?
(1 + 2) > 3 && 1 < 3
Is this want you mean @laserlight? The accepted answer in the link..
parsing - Shunting yard algorithm for immediate evaluation - Stack Overflow
Can I use Shunting-yard algorithm to evaluate Expressions (arithmetic, relational, and logical) ?
Haha I'm sorry I forgot to use malloc.
Foo* foo = (Foo*)malloc(sizeof(Foo));
Hi! I want to have a function pointer inside a typedef struct but I get a segmentation fault when I run my code. Here's my code:
#include <stdio.h>
typedef struct Foo {
void (*bar)(int);...
Thanks @laserlight. Problem solved :)
Hi! I'm getting some error on my function below:
Tree** getSibling(Tree** root, char* token) {
return !strcmp(token, root -> token) ? &(root -> child) : getSibling(&(root -> sibling),...
I come up with this code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct Tree {
char* token;
This is a General tree, here's my reference http://www.rsbauer.com/class/dsa2/slides/General%20Trees.pdf
I think I have to specify the parent node..
I want a pre-order traversal.
Hi Everyone! I'm have a General tree here and I have a problem on traversing it. Here's my code:
#include <stdio.h>
#include <stdlib.h>
typedef struct Tree {
char* token;
int...
Okay, Thanks haha :D
Can you tell me the code?
typedef struct Tree {
char* info;
struct Tree* children[MAX_LENGTH];
} Tree;
Is this correct??
Is there any way to make it possible? I want to make a node to point to N-nodes.
Hi Everyone!Can I a have one pointer with two reference in it. Here's what I've got.
char* c;
char x='x' , y='y';
c = &x;
c = &y;
-- or --
No, there is a separate input for octal and binary..
I'm sorry I don't understand you..
hi everyone can you help me how can i upgrade my program I want to input a octal and binary number and convert them in base 2, 8, 10, 16..
how can I write the scanf with the right parameter in...