Forum: Perl Aug 31st, 2008 |
| Replies: 0 Views: 247 GUI question Hello. My question is about perlTk. I'm wondering how to write a gui app like that: it has 2 buttons, 1 is "run" and 2 is "stop". App should run some function and when i press "stop" button, it... |
Forum: C Jun 11th, 2008 |
| Replies: 2 Views: 281 arguments in functions Hi guys. I cannot figure out how to do next thing.
for example i have a little progie like this:
int myfunction(int argc, char *argv[]){
int i;
for(i=0;i<argc;i++)
unlink(argv[i]);
}
int... |
Forum: C Jun 4th, 2008 |
| Replies: 3 Views: 314 |
Forum: C Jun 3rd, 2008 |
| Replies: 3 Views: 314 copying binary files and setting permisions Hi. i'm trying to copy a binary already with a predefined permissions. I got this code:
FILE *f1, *f2;
char cp;
f1 = fopen("file1","rb");
f2 = fopen("file2","wb");
while(!feof(f1)) {
cp =... |
Forum: C May 31st, 2008 |
| Replies: 3 Views: 286 |
Forum: C May 31st, 2008 |
| Replies: 3 Views: 286 |
Forum: C May 26th, 2008 |
| Replies: 7 Views: 1,236 |
Forum: C May 24th, 2008 |
| Replies: 7 Views: 1,236 find and replace string in a text file Hello. I am trying to find out how to write a function to replace a string in a text file. So far i got this:
find -> is a word i am looking for replace, rep -> new word, f1 -> my file. And i'm stuck... |
Forum: Perl May 14th, 2008 |
| Replies: 1 Views: 383 self killing perl prog HI guys. Jeezz, perl forum is kind of abandoned ;/ Anyway, maybe some one will have an idea.
I want to write a selfkilling perl prog :D Ok, i got a simple prog which shows up a simple tk window with... |
Forum: C May 4th, 2008 |
| Replies: 3 Views: 282 Re: executing commands from text file Salem, thank you!:) the code:
int main()
{
FILE *fp;
fp=fopen("file.txt","r");
char s[256];
while( fgets(s, sizeof(s),fp)!= NULL)
if ( strncmp( s, "hi", 2 ) == 0 ){
{ |
Forum: C May 4th, 2008 |
| Replies: 3 Views: 282 executing commands from text file Hi everyone. I got a total newbe question and i am new to c programming. I want to write a program that will executing commands , written in separate text file.
Lets say, in perl i got something... |