General C++ Programming - May 2009 (Page 7)

by Spiros
methods template specialization
 
I have a template class MyClass (with template argument typename), with a template method: template <typename Derived> class MyClass { template <int ...
[5 replies] Last: I think this is what you want: #include <boost/type_traits.hpp> ... (by jsmith)
by Adalte
Please, h e l p me !
 
Hi! It's very important for me to solve this problem. I'm very grateful for all hints, proposition or h e l p I can get. Thank You in advance. The proble...
[2 replies] Last: And please use [cod e][/co de] tags (by Bazzy)
How to display error when a char is entered
 
How can I make my program display an error when a char (a,b,c) is entered in the menu selection. At the moment, when I enter a char, it displays the error messa...
[1 reply] : Hi....... As Bazzy has correctly pointed out, do not use cin becaus... (by fauntleroy42)
curses and colors (1,2)
 
I've been playing with the CURSES library pdcurses to be exact and C++. Although I am trying to write a function that will evaluate everything that is to be pri...
[24 replies] Last: Yea that was the whole problem. I still am not sure why curses decides... (by dmoore210)
Compile error using pointer-to-member function
 
When this code is compiled: #include <iostream> using std::ostream; class Value { public: explicit Value(int amount) : m_amount(amount) {} v...
[1 reply] : It's (value.*method)(); Silly, isn't it? (by helios)
Getting the width of a line from a file
 
Hi everbody i wantto get the width of a line from a file.somehow i got this code #include <vector> #include <string> #include <fstream> #include <iostream...
[1 reply] : It's not getting the width of any line. It's taking the size of 'lines... (by helios)
creating a data-type
 
Hey I'm trying to store an integer that is 50 digits long but I can't find a data type that will support this number. If anyone can help my in creating a new d...
[1 reply] : Google arbitrary precision arithmetic. The most used library is GMP. (by helios)
Memory allocation overflow in c program
 
In a large system I try to allocate about 1GB of memory on a 4GB system and it blows up (returns a NULL pointer in C), Now I tried to allocate 1GB from ...
[1 reply] : The limits are set by: 1. Available memory, obviously. 2. How fragme... (by helios)
C Program
 
I have got a problem with a program I just made using a C compiler. The problem is that no matter what input I give, the answer is always 0. Please help. //p...
[3 replies] Last: No, you did not use pointers. You used the double value directly -- wh... (by Duthomhas)
how to pass 4-6 values from dll to exe in 1 function?
 
1) how to pass 4-6 values from dll to exe in 1 function? can i do that : return (a,b,c,d,e);
[6 replies] Last: You don't have to pass with a struct...You can simply pass references ... (by closed account S6k9GNh0)
expected constructor, destructor, or type conversion before "double"
 
dll compile occur error when in dev c++ sloved: --> it have some syntax error, i find out that if i don't post all my code , it difficult for others to te...
[13 replies] Last: thanks anyway , the problem have solved let's stop this post~ ~ (by chiwing)
by alogoc
Need program searches numbers inside a txt and perfroms an opperation
 
Program that will search specific numbers from inside a txt,cut them,and ask me to put the name of the folder to put them in : So the whole idea is abou...
[3 replies] Last: #include <sstream> #include <fstream> #include <string> #include <... (by Denis)
File locking for read and write
 
Hi all, I have two threads, one reads a file and one writes to the same file. I want to lock the file while writing so read is blocked until the file is unl...
[1 reply] : In my experience, fopen fails if the file has been opened with write p... (by Disch)
by dwade
How can I stop my never-ending loop
 
At the moment I have a menu displaying four choices (1. exit, 2. statistics, 3. find mark, 4. display mark). If the user types anything else apart from 0-3, the...
[1 reply] : You should validate the input: http://www.cplusplus.com/forum/articles... (by Bazzy)
by dwade
Finding the average Marks (I dont know how to get the total number of students)
 
The question I have to answer is to find out the average marks between two students. These students are: studentID: P1001 mark: 78.5 studentID: P1002 mark: ...
[1 reply] : //Corrected: #include <string> #include <iostream> using namespace ... (by Denis)
UOF
 
Hi, Has any one worked on unified optimization framework in C++? Somya
[no replies]
by pass
C++why this recursion code is not working?
 
can anyone fix this to work? #include<iostream> #include<cstring> #include<cstdlib> #include <cmath> #include <iomanip> using namespace std; #define...
[3 replies] Last: The problem lies with your function recursiveCos. It is coded to repea... (by fauntleroy42)
by Deimos
Issue with classes
 
Hey, Everyone. I recently came across an issue regarding some classes having access to other classes' members. For instance, I have classes such as TextFiel...
[4 replies] Last: And you probably want to make the copy constructor and assignment oper... (by PanGalactic)
terminating threads
 
Hi everybody, I have a question about terminating threads and deallocating memory. I need to kill four threads from the main function and be sure that the me...
[9 replies] Last: what do you mean with "designing thread"?... as long as u start a thre... (by Incubbus)
by Adalte
Problem with Node and virtual functions
 
I have to create an abstract class SHAPE with subclasses Polygon, Circle, Rectangle and Point. And I have to create dubbly linked list SHAPELIST but I can solve...
[no replies]
May 2009 Pages: 1... 56789... 17
  Archived months: [apr2009] [jun2009]

This is an archived page. To post a new message, go to the current page.