you will of course take the time of the day into account :D
essentially, i was to count the number of occurrences of any of a list of substrings within a larger string, like the number of vowels...
Type: Posts; User: andrew.bolster
you will of course take the time of the day into account :D
essentially, i was to count the number of occurrences of any of a list of substrings within a larger string, like the number of vowels...
Ahh well, just wondering if anyone had any ingenious functions. Will post what i end up with.
Thanks but i was simply using the English as an example. I'm trying to build up a source portfolio and atm are looking at a source code metric, eg, i need to count the operators and operands, but i...
Hi Guys
I'm looking for some advice again, I'm doing some code that looks at long strings ("long" being less than 200 chars) and picking out numbers of, eg, in english, counting the number of "the"...
yeah, and its only a couple, as, typically, out of a collection of hundreds of photographs, its ones i like too.
Actually, to answer your question more accurately, it is only *.jpg's, and while...
VLC supports flv files also, as is alot lighter than RP. High recommendation. As for grabbing the flv's, you used to be able to grab the direct flv URL from the page source, but i doubt they kept...
oh, the joy of hex editing then? anyone got any particular fav editors or anything that can make this a bit simpler without re-learning the jpeg format codes?
Ok, I've bin rearranging my backup server (ironic as it seems) by copying the entire contents from an NTFS drive, over the network to another machine, wiping the NTFS drive and reformatting as ext3...
code fixed
An annoying apparatus
--------------------
An annoying apparatus deliver at the gigantic glove
generally the apparatus deliver's
The glove fumble around a bad burst
thankyou...
Bingo, problem solved, thankyou, i cant believe i missed that. *hangs head in shame*
A adventurous band
--------------------
A adventurous band improve above the curious head
nearly the...
Changed things a bit, instead of doing the malloc you suggested i pass a char[] pointer to the getword function so it writes directly into the array, but the same problem still occurs (cut off words)...
either way, I'm calling it a night for the time being, i will work on it in the morning and update accordingly. Thankyou for the great help and advice, its much appreciated, and I hope by the end of...
did that, it was the same word but it knocked 2 characters off the front of the next line
latest full code
i moved u code you suggested from the link into the getword function
const char *getword(FILE* file, int max)
{
FILE *ip;
ip=file;
int i,j,size;
char c;
char buffer[20];
ok, that got rid of the new line but now its overwriting the following characters, eg
string1="banana\n"
string2="orange\n"
after running that if statement on both and printffing them both...
from that response i assumme that file pointers are kinda global?
unrelated question : fgets takes the entire line including the newline character. Any easy way of dropping the last character? i...
one quick question, can the rewinds be done within the function calls i.e rewind(ip) ?
ok, new code enclosed, its working. Thankyou for all your help, I'll continue posting code iterations.
apt indeed, im asumming thats called after each function call for the pointer?
take it theres no easy way to rewind other than (for howmanytimestherehasbeenanoperation)pointer--; ? how can the number of pointer operations be counted?
so, if im understanding correctly, instead of trying to mess around with file pointers, i should load all of the files into the program and handle them internally?
wont make a difference to the output of foo1, but foo 2 stays at 50 afterwards because the ->1 only applies to the local structure copy, is that close for an explanation?
to answer your question, before foo1, 50, after 1, before foo2, 50, after, 1
as i read it foo1 sets the value of a inside MyStruct s to a by pointer assignment via a local structure pointer thats a copy of the pointer to s.
foo2 does the same operation by making a copy of...