I just have never done this before. Linked list are still new to me. So if it works. it is correct :-)
Type: Posts; User: sillyman
I just have never done this before. Linked list are still new to me. So if it works. it is correct :-)
This is what I have for the swap code.
int change = 1;
char word[80];
while ( change )
{
change = 0;
current = start;
It couldn't be as simple as this are the values set in those pointers. Could it?
What is the proper way to sort a linked list. This was all I could think up.
int change = 1;
while ( change )
{
change = 0;
...
true, about the c part, but for perl look up function
finddepth
are you trying to create the Unix find command?
for c programming try ftw function.
or try ./ are you sure that is right path name?
Your code is correct. Check the perms on the directory.
which platform are you writing this for? Windows, Mac, Solaris, AIX, HP-UX, Linux?
Are you sure you have a tmp directory?
try this
#!/usr/bin/perl -w
$dirname = "/tmp";
opendir ( DIR, $dirname ) || die "Error in opening dir $dirname\n";
#include <stdio.h>
int a = 1;
int test()
{
return (4 + a);
}
int main(void)
Maybe this will help too?
int main(int argc, char *argv[])
{
printf("Program Name: %s\n", argv[0]
printf("Arg1 = %s", argv[1])
return 0;
C programs start with 3 open file handles
0 = stardard input
1 = standard output
2 = standard error
How is the user going to specify the file. Maybe by a command line argument?
argv[1]
I see. So in reality it means about as much to stdin as rewind would. thanks.
The situation where fflush doesn't work as excepted. This is my first time using it and it seemed to work. What situation caused you to notice that it returned unpred results? and learn this...
Sorry, It was for Elysia. When did you first encouter the situation?
Perhaps, I should just skip that and feed your ego ;-)
So I replaced fflush(stdin). Is this better?
#include <stdio.h>
int main()
{
int number=10, ch;
const char *numbers[] = { "Zero", "One", "Two", "Three", "Four",
...
How did you learn about that in the first place?
Okay, thanks. I never tried it before. So a better option would be to use non-buffered input?
Why would a college student working on an exercise type in EOF on a simple programming example? Can you give me an example of how to enter EOF into the program?
#include <stdio.h>
int main(void)
{
int b, c;
float a[5][5];
//'init array a
for ( c=0; c < 5; c++)
{
cute, ok. I agree totally... plus some error checking ;-)
#include <stdio.h>
int main()
{
int number=10;
const char *numbers[] = { "Zero", "One", "Two", "Three",...
laserlight has an excellent idea. The code might look something like this. Just to clarify.
#include <stdio.h>
int main(void)
{
int number=0 ;
I would use the qsort .... bubble sorts are fun and good for smaller datasets.
Anyway here is the array example followed by your request for the output file example too.
9 element array
...
1) You are looking for the end of line character (\n) it tells the command line to drop down one row.
2) You have to create a data store like an character array or a linked list. My example uses a...
This code reads (based off your code) every char or byte at a time and writes every byte to a sperate file. This isn't what you are saying you want to do. Technically it is wrong.
#include...