could not creat process?!

This is a discussion on could not creat process?! within the C Programming forums, part of the General Programming Boards category; i would be plzed that some1 tells me why doesn't my program run?and gives this massege "could not creat process!" ...

  1. #1
    Registered User samiei's Avatar
    Join Date
    Feb 2005
    Posts
    2

    could not creat process?!

    i would be plzed that some1 tells me why doesn't my program run?and gives this massege "could not creat process!"

    Code:
    #include<stdio.h>
    #include<stdlib.h>
    #include<conio.h>
    struct list {
              char alph;
              int freq;
    };
    struct list a[256];
    ///////////////////////////////////////////////////////////////
    int main(){
              int j,m,f,k;
              FILE *fin;
              char ch;
              clrscr();
              fin=fopen("a:test.txt","wt");
              printf("\n enter characters($ for end):");
                do{
                    ch=getchar();
                    putc(ch,fin);
                  }while(ch!='$');
              fclose(fin);
              fin=fopen("a:test.txt","rt");
              for(j=0,m=0;j<256;j++)
              {     f=0;k=0;
                         while((ch=getc(fin))!=EOF)
                         {
                            if(ch==j)
                            { f=1;
                              a[m].alph=ch;
                              k++;
                            }
                         }
                         if(f==1){
                            a[m].freq =k;
                            m++;
                         }
    
                         rewind(fin);
              }
              fclose(fin);
              getch();
                return 0;
    }

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,162
    Which compiler and OS are you running it on?
    If you understand what you're doing, you're not learning anything.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Could someone translate?

  4. #4
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    Did you compile your program?
    If so, which compiler did you use?
    Did it generate any errors?
    What operating system do you run?

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,443
    Probably typed
    prog.c

    Rather than say
    gcc -o prog.exe prog.c
    prog.exe
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,162
    Wouldn't that just result in a "command not found" error? It sounds to me like he's possibly compiling it into an executable format that's not supported by the OS. But since he came on with a worthless question and hasn't returned to actually fill in any of the blanks we'll probably never know.
    If you understand what you're doing, you're not learning anything.

  7. #7
    Registered User samiei's Avatar
    Join Date
    Feb 2005
    Posts
    2
    thx for all that trying to help.
    i'm using win xp.
    and turbo c++ and saved my program with the extension CPP.i copiled my program and it doesn't have any errors!

    appreciate your help

  8. #8
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,443
    See, another person using one of the oldest compilers for the PC on one of the newest operating systems
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  9. #9
    Registered User Micko's Avatar
    Join Date
    Nov 2003
    Posts
    712
    Quote Originally Posted by Salem
    See, another person using one of the oldest compilers for the PC on one of the newest operating systems
    Interesting!
    I'm writing a simple database program for console and want to make graphical interface. I have Visual Studio .net, Dev-Cpp and Turbo C and interesting I found that turbo C 2 because of it library graphics and many useful functions is more suitable for my task than any of "newer" compiler. Too bad it is written for 16 bit OS and sizeof(int) is 2 bytes.
    I think we should not underestimate the power of older comiplers such as Turbo C. It makes a life easier if you want to make graphical interface for console. At least that is my experience.

  10. #10
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,443
    I seriously doubt that there is anything you can do in TC which can't be done in a host of modern 32 bit graphics libraries for the sake of a bit of reading.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  11. #11
    Handy Andy andyhunter's Avatar
    Join Date
    Dec 2004
    Posts
    540
    Quote Originally Posted by Salem
    for the sake of a bit of reading.
    And I think we have a winner!

    Its obvious that people just don't want to bother to try and learn how to program for the console, hence the 'I like the older compilers better' comments. It really isn't that hard but it does require a little effort, alas what are you going to do.

    Here is adrianxw's console tutorial yet again for those that want to begin to understand console programming.
    i don't think most standard compilers support programmers with more than 4 red boxes - Misplaced

    It is my sacred duity to stand in the path of the flood of ignorance and blatant stupidity... - quzah

    Such pointless tricks ceased to be interesting or useful when we came down from the trees and started using higher level languages. - Salem

  12. #12
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Cannot create process is not because he is using Turbo C++.

    Cannot create process means that normally the process is already running and cannot have multiple instances running at the same time. If you code something in MSVC, run it, and forget to shut it down, recompile it and execute...you will get this error.

    Bring up the task manager and kill the other instance of the application and execute it again. Often what happens is the window for the other process has either disappeared or the program does not appear on the task bar, but is still an executing process - this usually happens because of a major bug in the code.

    DOS Turbo C++ version 1.0 thru version 4.52 all work perfect under XP. Interrupts work flawessly (software interrupts at least). You will have trouble with executing some DOS functions off of the DOS interrupt and you will certainly have trouble with directly accessing certain memory. You also cannot program the DMA and/or program sound cards due to the fact that hardware interrupts and the like don't work as expected.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. init adopts zombie process?
    By password636 in forum Linux Programming
    Replies: 4
    Last Post: 07-01-2009, 10:05 AM
  2. create a child process that creates a child process
    By cus in forum Linux Programming
    Replies: 9
    Last Post: 01-13-2009, 01:14 PM
  3. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  4. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 01:43 AM
  5. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21