No, I put in a cout << tellg() and that keeps increasing by one, but it never stops.. why?
Type: Posts; User: theweirdo
No, I put in a cout << tellg() and that keeps increasing by one, but it never stops.. why?
How come infile.eof() is never true in this example? I am stuck in an infinite loop... but I know that the size of input.txt is only 100bytes.
ifstream infile("input.txt", ios::in);
while...
Is there a way to use that function on two different fields (with same data type, ie: int)? I don't want to rewrite a function that looks almost exactly the same for each field that I have.
If I have a structure with two different datatypes as fields of the structure, ie:
typedef struct {
int value;
char *name;
} item;
Now I have an array of these items and I want to sort...
If I have a simple program like this:
#include <stdio.h>
#include <string.h>
void change (char *t);
int main (void)
{
Again, another simple question:
If I have a function header:
void foo (char *s, char **s2)
Can I call the function like this:
char *string1;
char *string2[10];
Yes, that is exactly what I need, thanks so much.
Hi! If I make a pointer to an array of characters like this:
char *text[50];
Will that be a pointer to a string that is 49 characters long? I want to make a list of words, where each word is at...
I believe it's some sort of streaming data. I need to manipulate the original file using some unix utilities and without using any temp files, put the manipulated data into my C program.
I don't believe I know how to use a buffer, I haven't programmed in a year so I'm pretty rusty. Is a dynamic array just a pointer of some sort?
Once I have the input (which is most likely a novel...
Well the method of saving the input cannot change. I am piping the input in from UNIX... And the input will be a large number of words, each seperated by '\n'.
Is there another possible function I...
Hiya, I was wondering if anyone could help me with a simple question on fgets().
I'm reading in an unknown number of characters into a char pointer using fgets... Now the arguments for fgets are...