473,748 Members | 2,563 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.
0
308
thread by: JustSomeGuy | last post Mar 9 '06 by: JustSomeGuy
I want to go through a std::list backwards.... std::list<mytype>::reverse_iterator it; \ for (it=out.rbegin(); it != out.rend(); --it) { ... }
4
4,185
thread by: mp | last post Mar 9 '06 by: pemo
When printing a floating math result I sometimes get the following: -1.#IND00 Can anyone tell what this means and how to avoid it? Thank you,
5
2,023
thread by: srikanth | last post Mar 9 '06 by: CBFalconer
is it possible not to decrement the top variable after we remove(or retreive) a file from a stack >MY IDEA is:> if top is not decremented the stack is like it has some files existing in it with the top most file empty >i.e, something like hiding the files by one step (or one position of stack) >i.e,if someone tries to extract the top most...
2
1,810
thread by: Geek | last post Mar 9 '06 by: Geek
Hi guys, I have a question regarding learning C++. I graduated with a Computer Science degree. recently I have found out that I need to learn languages better and professionaly. I am interested in learning for windows programming also I have a questions where should I start. I know the basics of most of the languages. I need to learn how to...
3
1,647
thread by: RadiationX | last post Mar 9 '06 by: Micah Cowan
Hello, I have a simple print output questioin. What I'm trying to do is print an array of lenth 20 which holds 20 ints in the form of five columns and four rows. like this below 12 80 90 6 7 1 6 99 8 9 8 3 5 3 12 9 4 2 2 15
13
5,162
thread by: ctor | last post Mar 9 '06 by: Howard
Hi, I'm experiencing an annoying issue. Here is a simplified idea of what I am trying to do. Inclusion guards aren't shown for readability. I hope this isn't too confusing; I don't think a description would be as clear as an example. ----------- class ParentA {};
2
1,635
thread by: dr_tella_nu | last post Mar 9 '06 by: dr_tella_nu
Hello World, the following code throws this error: error c2039: 'z' : is not a member of 'a' #include <iostream> using namespace std;
6
1,734
thread by: romayankin | last post Mar 9 '06 by: Gavin Deane
Can someone explain what am I doing wrong? Header: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class CMyBase { private: CMyBase(const CMyBase& obj); /* Disable copy constuctor */ void operator=(const CMyBase& obj); /* Disable assignment operator */ protected:
4
2,393
thread by: ahrimen | last post Mar 9 '06 by: ahrimen
Hi, First I'll state my over all goal = a text based game with several rooms that have several exits as my first real program that I've done without the help of a book. I can make a normal vector object out of a custom class, I can even use a single object of a class that has vector data members, but If my vector object of a custom class...
1
2,546
thread by: Willing 2 Learn | last post Mar 9 '06 by: osmium
Below is a program I did to recognize a Finite State Automata for ASCII (J+H)*. I got that one working but im having trouble getting the NFA program to work. I really desperately need help! My NFA has initial states: 2 and 12 ending states 2 and 12 I need help to switch program below from FSA to recognize NFA. I was...
4
1,592
thread by: sudhir | last post Mar 9 '06 by: Tomás
The c++ program is: #include<iostream.h> void main(void ) {;} Now without affecting the above two lines if I want to print the "hello", how to do that..Please provide me the solution sudhir
2
5,558
thread by: druha | last post Mar 9 '06 by: druha
Hi in a month i will have to start a multimedia project for the university. I want to do something related with handling graphic files, so i started to read several file format specifications and finally i decided to choose PNG since it looked the most simple format. I did some silly code to test it and i found some trouble, lets see if you can...
2
3,024
thread by: Murali | last post Mar 9 '06 by: Jerry Coffin
Hello Everyone, I am breaking my head with this problem. Please help me out. Let me first explain my problem : Here it is: I am working in realtime environment where i will be creating logfiles internally while my system is running.
3
2,339
thread by: sudhir | last post Mar 9 '06 by: Jerry Coffin
I defined a pure virtual function like virtual void sum()=0; <--- pure virtual function but If I defined a virtual function in a base class in case of multilevel inheritance for the base pointer to point the right function with same signature in base and derived class like-- virtual void sum() { }
2
1,823
thread by: shaun roe | last post Mar 9 '06 by: Victor Bazarov
If I have a baseclass A and have subclasses B and C, can I make a parametrized constructor for A, say A(chooseClass), which then uses the parameter to do: A * p_theBaseclass; if (chooseClass == 0){ p_theBaseclass = new B; } else { p_theBaseclass = new C;
1
2,385
thread by: lvbing1981 | last post Mar 9 '06 by: mahurshi
ÇóÖú ÇëÎʺ¯Êýstrtok()ÊÇÈçºÎ¹¤×÷µÄ£¿ Èç¹ûÎÒÒª½²Ò»¸ö×Ö·û´®¸ù¾Ýijһ¸ö±ê־ʵÏֶַΠ³ýÁËʹÓÃstrtok()»¹ÊÇ·ñÓÐÆäËû¸üÓÐЧÂʵĺ¯Êý»ò·½·¨£¿ лл help!! how about the strtok() function? who can tell me how the fnction strtok to deal with the string?
1
2,558
thread by: Assertor | last post Mar 9 '06 by: Victor Bazarov
Hi All, Except function pointer to a static member funciton of a class (or a function). As the following code, I could pointer a non-static member function of a class. And "Equal" was printed, the pointer has meaning. But how can I use it??
1
1,662
thread by: seema | last post Mar 9 '06 by: Victor Bazarov
I am new to C++ programming, can somebody explain what is this me_xx is it a type name or instantiation of class Final. And also how to use me_xx ? struct IViewObjectEx { public: void solv() { }
1
1,978
thread by: shane.tietjen | last post Mar 9 '06 by: Victor Bazarov
If you are dealing with one PCI card, is there a way (from within a dll) to find out which PCI slot that card is inhabiting (1 or 2 or 6, etc.)? It doesn't matter if the solution is MFC, or straight C++/C, just has to be on a Windows machine. Thanks in advance.
1
4,319
thread by: bsmith1111 | last post Mar 9 '06 by: Victor Bazarov
I have a program that outputs the following to the screen (through visual c++) 9999999999, which is stored in a double. I would like to keep the number the way it is, but every time I output it (after converting it to a cstring), it becomes 1e+010. I've tried many different formatting ways, including stringstream formatting, sprintf(buffer,...
2
2,161
thread by: Kamran | last post Mar 9 '06 by: Geo
Hi Can one implement dynamic field names in C++ and how ? I have been wrangling with that problem for a while now and I can't come up with a solution. The worst of the matter is that I am a newbie in C++. I believe one has something like this in python and in matlab and some other languages.
2
1,431
thread by: Fraser Ross | last post Mar 9 '06 by: Pete Becker
Can someone remind me of the syntax for a function that returns a pointer to a member function? The functions are going to be defined at the declaration. They will take no parameters. I've given the pointer members here. TColor const (TuserInterface::* pointerToGetPointColourFunction_)(unsigned int const) const; TColor const...
3
1,684
thread by: junkmonkey | last post Mar 9 '06 by: Neil Cerutti
Hey everyone. This is much more of a general question than a code-specific one. For class, I need to write a text-based adventure game. I know that I will be using classes to implement different aspects of the game (player, rooms, traps, etc.) and was wondering what are the limitations on classes. As of now, I know they basically define a...
2
1,588
thread by: Jehudi | last post Mar 9 '06 by: Jehudi
Hi MegaBrains, Working in Dev-C++ I defined the following structure #define NO_SECTIONS 6 struct Track{ int Number; int noElems; float x_pos; float y_pos;
1
2,014
thread by: Sandeep Srinivasa | last post Mar 9 '06 by: Pete Becker
hi, I have a software which uses huge STL data structures. Since STL retains its mempool, the memory that is used is not given back to the system. Now consider a simple class: MyClass *c1=new MyClass; Suppose I do a million of these too, then it takes up all of the memory

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.