GCC/Command Prompt error: '.' is not recognized as an internal or external command
<p>I'm fairly new to C and am completely new to using the command prompt and GCC to compile and run my programs. I'm struggling to find the right words to ask this question properly so please bear with me, I am doing my best.</p>

<p>I need to use GCC to compile and run this C program but I'm getting an error that I do not understand. In this example program, I was told to use these lines to compile and run the code:</p>

<pre><code>$ gcc -Wall -std=c99 -o anagrams anagrams.c 
$ ./anagrams  dictionary1.txt  output1.txt
</code></pre>

<p>So that is what I did. GCC does compile the program file, so the first line does not give me any error. But GCC does not like the second line, as shown below: </p>

<pre><code>C:\Users\...\Example&gt;gcc -Wall -std=c99 -o anagrams anagrams.c
C:\Users\...\Example&gt;./anagrams dictionary1.txt output1.txt
'.' is not recognized as an internal or external command,
operable program or batch file.
</code></pre>

<p>Everywhere I look, it says to use "./filename" to run the program after compiling so I don't understand why it is not working for me. Any help or advice would be really appreciated.</p>

<p>Also, here is the main() of the program to show why those two .txt files are needed:</p>

<pre><code>int main(int argc, char *argv[])
{
    AryElement *ary;
    int aryLen;

    if (argc != 3) {
        printf("Wrong number of arguments to program.\n");
        printf("Usage: ./anagrams infile outfile\n");
        exit(EXIT_FAILURE);
    }

    char *inFile = argv[1];
    char *outFile = argv[2];

    ary = buildAnagramArray(inFile,&amp;aryLen);

    printAnagramArray(outFile,ary,aryLen);

    freeAnagramArray(ary,aryLen);

    return EXIT_SUCCESS;
}
</code></pre>