hi - am trying to solve a problem and I'm getting now-where: <br><br>I am trying to teach my self C - <br><br>here an exercise question from a book I am trying...
once you get the name of the files, either from the command line or from your scanf function(have you considered gets()?), they are strings, and you can use...
first off cheers for your help - slowly I am getting there. <br><br>my next problem is the move command - how would I go about this - how do I move a file - is...
>my next problem is the move command - how would I go about this - how do I move a file - is the copy command not the same?<<br><br>Usually, "move" is...
thank you and its nice to know am getting some where - I came up with the same idea myself arter about 3 hours ripping my hair out - well what i have left! but...
Hi! When I use malloc, there is sometimes a limit in the size of the block I can allocate, but I know there's enough memory in the compouter. Is there an ...
on DOS or console, the first argument, argv[0], is the drive,path, and name of the program... for instance: "c:\vc\test.exe". so there is always at least one ...
yes it does thank you - <br><br>can I be so bold as to ask another question well two more, <br><br>firstly - my delete command should give the user the ...
ok so how do strstr searches for the first occurrence of its second string arugment in its first string? <br><br>each line of the file = 1 string?<br>then ...
I would start off with fgets() to read each line, and then pass the pointer to your line buffer (character array) to the strstr() function.<br><br>--I'm ...
You should have a function called realloc(). It will allow you to extend the size of your current block. But beware. It works (if additional memory is ...
The problem with reading a line of data from a file, is that you have to guess how big the largest line is going to be. We'll guess that the longest line have...
#define MAX 80<br><br>FILE *Fp=NULL;<br>char haystack[MAX]<br>char *needle_pointer;<br><br>while(fgets(Fp, MAX, String)){<br> /* needle is the substring */<br>...
ok - 3 questions - <br><br>Question 1<br><br>is there somewhere I can go to see sample code - program for c. the course that I'm doing is fine and I understand...
Hi all,<br><br>I'm just getting into C and am learning about using stacks. However, I am now stuck with push() not working as expected. <br>Code below: file is...
It looks like you want to push "character pointers" on you stack, but you are telling the compiler to reserve an array of characters (...this should be an ...
This is a reply to your 2nd question.<br><br>your code contained the following lines of code.<br> while(fgets(line, sizeof(line), in_stream))<br> tokenPtr = ...
if you are only wanting to see if the string entered for the filenames are the some try using the function strcmp. It will compare the two strings and return 0...
Does anybody know if its possible to use getchar() to get say 4 characters from they keyboard then allow the rest of the program to go on? I dunno if I've ...
This is a question about "buffered input" vrs "unbuffered input". <br><br>Normally, "C" will allow your operating system to do the simple line editing tricks ...
Hi all. Hope someone can help me out here.<br><br>Im trying to learn C, and i am currently on the subject of Arrays - this one question is really annoying me...
I've read your query about 5 times. This is the kind of thing that I hate. Even when you get done, you won't know if its right.<br><br>Let's start with one ...
Thanks for your help Tom - much appreciated.<br><br>Tell me, ive just started C programming ( well, actually, ive been sort of reading about it for about a ...
If you want to start at the top (...a senior position) you should know your stuff, and have experience too.<br><br>But then in the real world, no one starts at...
#include <stdio.h><br>#define PI 3.14159 <br>/* Types defining the components needed to represent each shape. */<br>typedef struct {double area,<br> ...
I downloaded your code. I notice that there is an interaction between the getchar() and the scanf() functions. What do you need help with?<br><br>--Tom...