Hi,
I have the following structure, made up of four structures:-
struct customer_details {
struct1;
struct2;
struct3;
Type: Posts; User: wjday
Hi,
I have the following structure, made up of four structures:-
struct customer_details {
struct1;
struct2;
struct3;
Hi,
I've asked this question before but although I got a solution that worked, I didn't understand why it did. Bassically, I have a class that sets up a point, and then another class that uses...
As a matter of interest, how would I overload the << operator?
Sorry, it does work!!!!!!!!!
Thanks,
Bill
that brings up the same error message. Any other ideas?
Thanks,
Bill
Hi,
trying to teach myself C++ and have ran into the following problem......
I have created a class "point" to hold a coordinate. I then have another class "circle" which records a radius and...
well done that man.
Now works fine....no mention of .cpp extensions in book though!!!
Thanks again.
Bill
the code is.....
#include <iostream.h>
// -------------
// PROTOTYPES
// -------------
int calculateArea(int height, int width, int depth);
Hi,
This is my first day at trying to teach myself C++, although I do have experince of C.
The problem that I have is that using Microsoft Developer Studio, when I include <iostream.h>, the...
thanks for your interest, i've solved it like this.....
commentsRemoved = (strstr(copy, "//"));
if (commentsRemoved) {
(int)commentsRemoved = commentsRemoved- copy;
...
sorry, i don't understand what you mean with your new suggestion.
is there any way that i could use the strstr function (which recognises whole strings)? Something along the lines of when it finds...
But they're allowed by Microsot developer studio and i have to cater for every possibility.
With the /*....*/ comment, I will have the same probem, as the strtok function seems only to recognise...
still having no joy.
Any more ideas?
Thanks
Hi,
Trying to write a program that reads C files and so need to ignore comments. I'm using the strtok function
strtok(myline, "//")
to remove single line comments. However, this tokenises...
Hi,
I've written a program and want the output to go to file. My data is stored in a linked-list and a function is called to loop through the list and print it, using something like
...
is there a c function that counts the number occurences of a character in a string. For example, given
somthing like...
(apple, p)
will return 2 (for two p's)?
Thanks,
Bill
i sort of know what the problem is but still need a little bit of help...
char line[1000] is getting passed to the 1st function where it is being tokenised. When the 2nd function tries to use...
"line" is decalred as...
char line[1000];
i'm trying to read a text file line by line. the two functions that i call don't modify the line, though i am ready the tokens by splitting it...
...
Hi,
I'm reading in a file called openInFile and then passing it line by line to two functions as follows....
while (fgets(line, sizeof(line), openedInFile) != NULL) {
...
I am writing a prog. which performs tools on a variety of other C progs. When I know that paths of these files, I can store them as an array in my source code.
However, I want to be able to...
if I have char delim[] = "\t " then the prog. works fine, but when I add \n to it, (ie: char delim[] = "\t in") it compiles but I get the message that the programme has performed an illegal operation...
thanks mate, i think i understand the strtok a lot more now. I'll give your suggestion a go but i think it will work. can't understand why your fontsize is so big though!!!!
Bill
PS. Can I ask...
Am using....
while (fgets(line, sizeof(line), openedInFile) != NULL) {
splitTokens(line);
}
to open file and send each individual line to splitTokens, which has (char string[]) as...
Hi,
I am using fgets() to read in a series of lines from a text file, then splitting this into tokens using strtok(). These tokens are then compared to an array of other tokens, and printed if the...
hi, can someone help me with this (hopefully) minor problem...
I want to open a C file and read it in word by word (or split it into tokens as is possible in Java). This is so that I can recognise...