473,544 Members | 2,333 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
1,300
thread by: Rubén Campos | last post Jul 22 '05 by: puppet_sock
I want to write a class to manage keyboard SHIFT, ALT and CTRL modifier keys in an event management system, distinguishing between left and right keys of each one. This seems trivial, but I've found a design problem (from a formal perspective) I dealed with before, in other contexts, and for which I can't find an optimum solution....
2
1,519
thread by: Ramiro Barbosa, Jr. | last post Jul 22 '05 by: Sharad Kala
All, I was wondering why this causes a debug assertion failure in MSVC6.0/EE/SP5: void main() { char* p = "HELLO"; delete p; }
2
1,620
thread by: BCC | last post Jul 22 '05 by: BCC
What the heck am I doing wrong? void MyClass::JoinIdenticalFingerprints(CFPrintList& list) { CFPrintList unique_list = list; unique(unique_list.begin(), unique_list.end(), UniquePredicate); } bool MyClass::UniquePredicate(const CFPrint& x, const CFPrint& y) {
2
1,837
thread by: Joel | last post Jul 22 '05 by: Joel
I am having some problems compiling my code on Mandrake 10 with g++ (GCC 3.3.2). The problem seems to be in that I try to define a functor that compares two pointer objects, and use that functor to sort a list of pointers. It seems correct to me, and when I read on these boards I could not find any one complaining about the same problem. But...
2
1,795
thread by: news.tkdsoftware.com | last post Jul 22 '05 by: Mike Wahler
How would one go about connecting std::cout to a CRichEditCtrl object? --
2
1,213
thread by: Christopher Benson-Manica | last post Jul 22 '05 by: Christopher Benson-Manica
Is a conforming C++ implementation required to issue a diagnostic when invoked on the following code? #include <cstdlib> #include <iostream> #include <string> int main() { printf( "Hello, world!\n" ); // oops, <cstdio> missing
2
1,219
thread by: Patrick Kowalzick | last post Jul 22 '05 by: Chris Theis
Dear all, Is the default parameter for t in the function foo guaranteed to be NULL in the case below ? (MSVC 7.1 and g++ implements it like that) #include <iostream> template <typename T> void foo(const T & t = T())
2
2,476
thread by: Daniel Czajko | last post Jul 22 '05 by: Barry Schwarz
Given that I already have a remote computer's name, how would I go about finding out its IP address? I'm using VC++ 5. Thanks
2
1,275
thread by: Joe Black | last post Jul 22 '05 by: Thomas Matthews
GUYS ITS MY BAD CUS I'VE BEEN OUTTA CITY DOR THESE 2 DAYS AND ACCTUALLY DID SOLVE THE PROBLEM WITH SOME HELP FROM A FRIEND OF MINE. TO JUST DISPLAY A PREGIVEN NAME IS VERY SIMPLE THE PROBLEM WAS TO SHOW ANY NAME INPUTED FROM THE SCREEN....: THE CODE WORKS AND ITS GOOD, IF SOMEONE COURIOUS CAN FIND THE CODE INTERESTING JUST WRITE TO ME CUS ITS...
2
1,673
thread by: Mahadeva | last post Jul 22 '05 by: JKop
What does it mean to say : Using Multiple Inheritance, the class iostream (not to be confused with the header file iostream - these are seperate things) and the class fstream derived from the class iostream (again ??) Can someone please help me. I am tossed here :(
2
1,218
thread by: Tuurbo46 | last post Jul 22 '05 by: assaarpa
Hi Hello all, im just going to ask a quick question. What is the most popular newsgroup for java? Hope this word dosnt affend anyone. lol Cheers
2
5,559
thread by: Fred Zwarts | last post Jul 22 '05 by: Fred Zwarts
If I am right, members of a class that are const and not static must be initialized in the initialization part of a constructor. E.g. class C { private: const int I; public: C(); };
2
2,246
thread by: glen stark | last post Jul 22 '05 by: glen stark
Hi. I had an interesting experience with a brand x compiler recently. I had class defined within a namespace, and in that class I declared the "<<" operator as a friend to that class. Then, in the cpp code I implemented the operator overloading within a "using namespace" context, only to get access errers. To get it to work I had to put...
2
1,374
thread by: Dirk Schippers | last post Jul 22 '05 by: Victor Bazarov
Hello, I'm not sure if I'm in the right newsgroup for this question, but if I am not, please tell me where to ask it! A program of mine, written in VC6, seems to have a hard to find, and hard to reproduce crash. It runs in several hospitals so I am not able to do debugging on the servers where the crashes occur. Now, someone told me that...
2
3,536
thread by: Marie | last post Jul 22 '05 by: Greg Schmidt
Hi, I´m trying to perform Fourier Transforms on contiuously incoming images from a camera. I have sofar been using the Basic Interface for planning and execution for every image. Later I have tried to only perform the basic planning once and then using the Guru Interface for execution continuously for each incoming image.
2
2,592
thread by: Mike Pennington | last post Jul 22 '05 by: Ira Baxter
I have an existing set of applications containing hundreds of structures coded in C++ which I need to translate into IDL. Does anyone know of any software which can do this job? Shareware or freeware would be preferable, but any and all suggestions are appreciated.
2
1,713
thread by: Patrick | last post Jul 22 '05 by: Howard
Hi I have a problem in my C++ Funktion. I needed an 2 dimensional Array. For this i took a template script in order to create the array in the funktion. The Size of the Array I have to calculate first before I create it.So I have to init it inside my Funktion. Now how do I get this Array so that it is globally accessible. Thanx Patrick
2
1,507
thread by: Randy Yates | last post Jul 22 '05 by: Tom Widmer
Is there any way to get the filename with which a stream was opened? I don't see anything obvious in the stream API. -- % Randy Yates % "Ticket to the moon, flight leaves here today %% Fuquay-Varina, NC % from Satellite 2" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> %...
2
2,095
thread by: Patrick | last post Jul 22 '05 by: John Harrison
Hi I have an integer vector std::vector filled with data of an image. How can I show it on the screen.I know the size of the picture. I'm using VC++ 6. Thanks in advance. CU Patrick
2
1,086
thread by: Thomas Lorenz | last post Jul 22 '05 by: Thomas Lorenz
Hello, im working on a problem related to smart pointers. If the following is legal C++ A* a(new A()); B* b; b = a; I want to be able to do the following:
2
1,503
thread by: Matt | last post Jul 22 '05 by: Nils O. Selåsdal
For example, we want to produce a new language called NewLang. When we implement the compiler of NewLang, we should use languages other than NewLang. Correct? But I heard Java is implemented in C/C++. More specifically, does it mean the Java compiler is written in C/C++? But the Java API is written in Java itself. This is the confusing...
2
1,743
thread by: Michael | last post Jul 22 '05 by: Michael
Ok Guys, on the same thread I'm writing a Game engine, which performs collision detection. I want to sepate the collision boundings libaray from the main game engine and load it as a library. If simplified this example but it illustrates the point.... :-) So i declare an abstract base class ( & function ): ...
2
2,361
thread by: Johan | last post Jul 22 '05 by: Mike Wahler
Hi, Where can I find coding example in C++ for homogeneous container. John
2
1,262
thread by: Jon Slaughter | last post Jul 22 '05 by: Mike Wahler
This has wasted about 4 hours of my time to narrow this stupid thing down and I have no clue to why its screwing up. The problem is, I'm trying to write a file and if I mess with the data array fwrite does not write the exact size that I tell it to(even if I hard code it to write m bytes, it write's n bytes)... Heres example code that...
2
1,521
thread by: Gandu | last post Jul 22 '05 by: John Harrison
Could some C++ guru shed some light as to what might be going on? I have the following two classes which are simply data containers: const unsigned int MAXSIZE = 40; class DataItem{ char fname; char lname; char fname; char street;

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.