|
Create loop to count words in a file I need some help in creating a loop to count the number of words in a file. I've already opened the file. I know I'm not giving much info... all I need is a jump start thanks ... 8 Mar 2006 19:45
pointer's pointer Hi All, Here is the declaration I can't understand: APattern_t * * gStatePatterns ; /*the array of pointers to the state patterns */ // this is pointer's pointer? why we need this ? Here is the APattern_t's define: typedef struct APatternTag { ..... ...... }APattern_t ; BR/ Boki... 3 Mar 2006 03:56
Help with vectors of derived class pointers Ok so I know that a vector instantiated to a base class will slice derived objects copied into it by value. I am not doing that, and actually what I am wanting is a bit more complicated, if not impossible so HELP! please :-) Example code: #include <iostream> #include <vector> #include <typeinfo> using names... 4 Mar 2006 03:51
cout and uint8_t Anomaly The following compiles and runs on Linux with gcc 4.0.1. #include <iostream> #include <stdint.h> //#include <inttypes.h> using namespace std; int main() { uint16_t i16 = 16; uint8_t i8 = 8; unsigned char c = 'C'; cout << endl << "uint16_t i16 = " << i16 << endl; cout << endl << "uint8_... 2 Mar 2006 05:30
Menu looping Hi everyone, I'm kind of new to C programming, so I thought that a newsgroup would be the best place to ask a question about this. I'm trying to write a small program that displays a menu and has the user input a value(int). I'm only using getchar and printf to make things simple. I have the menu printing p... 1 Mar 2006 03:56
Class Average Program Hi! I'm working a program that should take a text file that has the students name and test scores and output that info to a outfile showing each students name along with their test scores, average and grade and class average. Here is what I have so far (and it's not working correctly!): I think the proble... 27 Feb 2006 20:47
Call by reference Hi, a general C++ question on "call by reference". In which cases it is recommended to pass function arguments by references (&) instead of by pointers? Actually the reference (&) approach is nicer for the programer since the function arguments passed as references (&) can be used as normal variables with... 21 Feb 2006 17:23
What is equivalent to NULL? Why not EOF? I come acorss a question about NULL, so I write a piece to verify my opinion, but I'm cofused at the result.(Under dev-c++4.9.9.2, and I have not tried other compiler.) ********************************************************************** #include <iostream> using namespace std; int main() { void *p; ... 21 Feb 2006 02:06
Passing reference through void pointer I have a seperate thread function that I was passing a class pointer through a void pointer. Then I realized that the location of my object was changing because it was in a vector like this: std::vector< ThreadConnection > Connections; std::vector< ThreadConnection >::iterator it = Connections.insert( Conn... 21 Feb 2006 21:01
Help with input/output files I'm writing a program that will read a student's name together with his with his or her test scores. The program should then compute the average test score for each student and assign the appropriate grade. The grade scale is as follows: 90-100-, A; 80-89, B; 70-79, C; 60-69, D; 0-59, F. I'm just trying to tes... 22 Feb 2006 19:32 |