473,544 Members | 1,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
2
3,613
thread by: Billy Patton | last post Jul 22 '05 by: Karl Heinz Buchegger
I've had a lot of help, but I need a little more. Here's a snippett of code: template <typename K,typename V> class HashTable : private std::map<K, V> { private: public: bool Keys(K& key, bool firstp = false) const
2
1,456
thread by: grahamo | last post Jul 22 '05 by: Victor Bazarov
Hi, I realise that c++ knows nothing about threads however my question is related to an (excellent) article I was reading about threads and C++. For all intents and purposes we can forget the sample at hand is concerned about threads, it could be related to widgets for the purpose of this question (that's so I don't get flamed and told to...
2
3,228
thread by: Lynn | last post Jul 22 '05 by: Lynn
I am including a new header file in a existing function that has "using namespace std;" defined in it already (from a long time ago). The new header file has the vector data items specified properly with the std:: namespace identifier on each. typedef struct tagFLSDRAWING { std::vector <STREAM *> hStreams; std::vector <STRMVERTX *>...
2
3,387
thread by: Serengeti | last post Jul 22 '05 by: Serengeti
Hello, in my class I have a map that translates strings to pointers to some member functions. The code goes like this: class F { typedef void (Function::*MathFuncPtr)(); std::map<std::string, MathFuncPtr> predefinedFunctions; // lots of other stuff void makeDictionary(){ predefinedFunctions=&F::f_sin(); } };
2
3,057
thread by: Alex Mizrahi | last post Jul 22 '05 by: Alex Mizrahi
Hello, All! i admit that it's better to ask questions connected with atl/mfc classes in special newsgroups, but seems like people there are interested more in discussing stuff like MFC GUI than C++ 8-/, so i'll better ask here too.. CStringW is a class in atl/mfc dealing with strings 8-]. the only typecast operator i found is to PCXSTR...
2
957
thread by: Sreenivas | last post Jul 22 '05 by: Alex Mizrahi
Hi, I am facing a strange problem. When I add/modify some code in a class and rebuilding the shared library with VC++(cl.exe) compiler, I don't see the effect. The execution flow still follows the old structure when I debug that program. I am running the application on Windows2000 Server. I know that in Unix based systems, we need to set the...
2
1,020
thread by: Simon Elliott | last post Jul 22 '05 by: Simon Elliott
I want to do something along these lines, but with one crucial difference: class foo1 { public: foo1(void){} void Test1(void) { i1 = 1;
2
1,803
thread by: James Niceguy | last post Jul 22 '05 by: James Niceguy
Hi, I have written a simple program that does the following: The main program will spown MAX_THREADS number of threads, each of which will simply add to a global shared counter for MAX_COUNT times and notify the main thread it has finished by clearing a mutex before exiting. The main thread will simply check verify the final result in...
2
2,534
thread by: Szymon Bobek | last post Jul 22 '05 by: Jens
Hello, Is it possible to get time with precission to 1/100 of second using time.h? If yes - how? If not - where should I search for function which can do it? Thanx, Szymon
2
3,901
thread by: candy_init | last post Jul 22 '05 by: msalters
hi all, Is it true that the cout function used in C++ for printing data to the console is implemented via the "write" system call? If not then how the cout function is implemented? Thanks, Candice
2
1,335
thread by: danny van elsen | last post Jul 22 '05 by: msalters
hello all, in my application, I want to save the state of a number of classes to disk: what would be the best way to do this? right now, I'm hard coding the fields of the classes, but of course after every change to the classes, I also have to adapt the 'save' method. Is there a better way, perhaps using some kind of reflection? I've...
2
4,159
thread by: Someonekicked | last post Jul 22 '05 by: Mike Wahler
this is example of what is going on my program, and the error im getting : when i try to compile the following : #include <iostream> using namespace std; class first { public: first(int max) { };
2
274
thread by: Pat | last post Jul 22 '05 by: Pat
I have ran into this problem numerous times during one of my C++ course. This issue is taking in a string with spaces, for example; #include <iostream> #include <string> using namespace std; int main() { string userInput;
2
1,385
thread by: Gomez,Martin | last post Jul 22 '05 by: Richard Herring
hello, necesito crear un programa que me capture las coordenadas,altitud,latitud, capture gragifos de mapas giratorios 360º, es un proyecto estudiantil en colombia Tks. saldarriagajuan@latinmail.com***** ***urgente*******
2
1,463
thread by: cpptutor2000 | last post Jul 22 '05 by: Alf P. Steinbach
Could some C++ guru please help me? I am using a BigInteger class which is really a wrapper around a C source file(mpi.c) that does arbitrary precision arithmetic operations. When I compile the C file using gcc -g -o mpi mpi.c rng.c -lm there are NO compilation or linking errors. However, when I try to compile the C++ wrapper class using...
2
5,665
thread by: Julian | last post Jul 22 '05 by: Stephan Brönnimann
I would like to have output from my program to be written to cout as well as a file. (actually, i want several other output options but this should explain my problem in the simplest way). I have seen commercial programs print output to the screen as well as to a log file. depending on the user and other situations, i might want to turn off...
2
1,347
thread by: graftonfot | last post Jul 22 '05 by: Mike Wahler
Hi there, I've programmed in C++ for many years, but I've been away from it for a while. I have some JDK 1.4 code that I need to re-implement in C++. I am wondering, are there any commonly-used libraries for replacing the Java SDK types (particularly all the containers) that people use these days? I know about the STL, but was wondering...
2
1,159
thread by: Lynn | last post Jul 22 '05 by: Rolf Magnus
Are std::vector items guaranteed to be continuous ? For instance, if I have a "std::vector <char> text". If I get a pointer "char *p = & text ;", can use the pointer to work thru the limits of the vector ? Thanks, Lynn McGuire
2
10,912
thread by: kalpana.sinduria | last post Jul 22 '05 by: Chris Jefferson
Hi all, how to remove the following complle error. When I compiling the code I get the following errors: Compiling... CDrtEachDefFeat.cpp d:\ include\common\cdrtintegfeat.h(39) : error C2143: syntax error : missing ';' before '*'
2
1,572
thread by: Tony Johansson | last post Jul 22 '05 by: msalters
Hello!! All my exemples is from a book so don't bother complaining that the struct should have been a class instead. Below I have two example it says START EXAMPLE 1 and futher down you have END EXAMPLE 1 and after END EXAMPLE 1 you find START EXAMPLE 2 and futher down you have END EXAMPLE 2. In example 1 you have an abstract base class...
2
1,709
thread by: grahamo | last post Jul 22 '05 by: Mike Wahler
Hi, i know I should use the new style casts and I intend to however I would like to know how I go about this; I have an unsigned char* that a 3rd party API returned to me. The API reads text from a file and gives me that test as an unsigned char*. For the sake of this example the text string is "100" unsigned char* data = foo();
2
321
thread by: Kramer55 | last post Jul 22 '05 by: Victor Bazarov
I started teaching myself programming over the summer, but have not had the time. I recently began to start my programming again, but realized i couldnt even do a simple problem create a program that displays how many numbers the user enters i cant believe i have forgotten how to do something so simple!
2
4,532
thread by: Tim Smith | last post Jul 22 '05 by: Tim Smith
Dear All, Silly question, but I am having trouble understanding the diagram on the inside back cover entitled "Design Pattern Relationships." It shows the relationships between all of the design patterns. Unfortunately, the book doesn't exactly explain what it all means. Although it looks very pretty - would anyone give me some...
2
2,330
thread by: Jignesh | last post Jul 22 '05 by: Saurabh Aggrawal
Can someone please tell me how to "import" a directory structure into a project in Microsoft Visual C++ .NET 2003. I have an extremeley complex directory structure consisting of thousands of files and hundreds of subdirectories. I want to be able to view all of these inside of my project in the same directory structure format. I don't want...
2
1,139
thread by: Wat | last post Jul 22 '05 by: Siemel Naran
When read a sample code using "enum", it uses min and max values for "enum" type. enum MyType { MyType_Min, ... MyType_Max };

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.