49,766 Topics

Member Avatar for
Member Avatar for tikoti

Hi all! I get the following error while trying to compile this code /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_numeric.h:116: error: must use .* or ->* to call pointer-to-member function in `__binary_op (...)' I am quite stunned because I've used before in a similar way Can any body give me a hint? Thank you in advance! …

Member Avatar for tikoti
0
275
Member Avatar for Lyandor

A little poll, which do you guys prefer to use for an application that uses 2 or more windows at the same time? MDI or modeless dialogs? And the reason why.

0
128
Member Avatar for ztdep

Dear friends: I want to use the code block under open suse 11.4 system. But i do not know how to install it. I downloaded severay binary packages in the code block websiet, but none of them can work. Could sombody help me and give me a link about the …

Member Avatar for mike_2000_17
0
81
Member Avatar for abdul04

Hi, i have written this block of code which deletes a record from a file, it works to some extent. i can delete existing records but at the second deletion and i display the file contents, i get some gibberish. also i cannot delete records which i have added to …

0
52
Member Avatar for west456

Need help on this not for sure what I am missing I get a couple of errors!In included both the .h and .cpp information. [CODE] // Make sure the header file it not added more than once #pragma once #ifndef MYTIME_H #define MYTIME_H #include <iostream> using std::ostream; using std::istream class …

Member Avatar for Lyandor
0
548
Member Avatar for Kesarion
Member Avatar for m4ster_r0shi
0
553
Member Avatar for Nexgr

Hello, I create a bst with the following code: [CODE]class BinarySearchTree { public: struct tree_node { string code; float min; float max; tree_node* left; tree_node* right; }; tree_node* root; BinarySearchTree() { root = NULL;} bool isEmpty() const { return root==NULL; } };[/CODE] The tree is sorted according to the min …

Member Avatar for Nexgr
0
151
Member Avatar for abdul04

Hi i'm attempting here to let a user select the id of a record he/she wishes to modify, find that record and allow the user to modify the record. this is as far as i got, after i locate the record and try to display it i get gibbrish as …

Member Avatar for abdul04
0
151
Member Avatar for perfectBing

Hi Coders, I was just trying out a simple singleton class. I have wriiten the below code. Now My que is : How do I instantiate the class from main function. PLS HELP :) [CODE] class MOV{ private:static MOV* inst; MOV(){cout<<"Hellooooooo\n"<<endl;} public:static MOV* get_it(){ if(!inst){ MOV *p=new MOV; cout<<"1st instance …

Member Avatar for alwaysLearning0
0
84
Member Avatar for Valiantangel

Hi can someone help in in understanding the following code esp the "?".I cant understand how the output 9:10:5 as obtained. Thank You. The code is as followed: [CODE]#include <iostream> using namespace std; int main() { short hour =9, minute =10, second =5; cout << (hour <10 ? "0":"" )<<hour<<":" …

Member Avatar for Narue
0
166
Member Avatar for NvIs

Ok This is my first post on this forum, and would really appreciate some help on an assignment... I have a 2d array and I need to add up all the numbers within the rows and the columns of the array. I'm really not to familiar with arrays or for …

Member Avatar for PCSO
0
4K
Member Avatar for tomtetlaw

Could someone please explain how DWordSwapAsm works without a return statement? I've ran the program with breakpoints and [ICODE]i[/ICODE] gets changed even though there's no return value in that function.. how does this work? NOTE: I don't want help with the assembly code, just the function itself. [CODE]template <typename T> …

Member Avatar for tomtetlaw
0
110
Member Avatar for sandman64

I wrote a program that solves graphing programs. I am still very new to c++ and mt program is very very rough around the edges but my main problem is when the function returns the value to the main function it outputs random numbers in stead of the correct value. …

Member Avatar for L7Sqr
0
184
Member Avatar for Lyandor

Hey guys, I'm new to this forum so nice to meet you all :D I'm really bugged by a weird bug that prevents my dialog from showing up, however the buttons show up twice, one overlapping the other. I saw other threads that discusses about this but I'm afraid I …

Member Avatar for caut_baia
0
175
Member Avatar for caut_baia

Hi guys.Does anyone who studied the implementation of stringstreams know if : [code] char c; std::stringstream ss; ss << std::fstream ("file.xml",std::ios::in).rdbuf();//this is eqaul in terms of speed while (ss.get(c)) {} //with this? std::ifstream f("file.xml"); while (f.get(c)) {} //or this? [/code] Thanks a lot.

Member Avatar for caut_baia
1
108
Member Avatar for radiata

Hello, I'm doing a homework assignment from my Computer Science course and I'm having a bit of trouble. so far I have the code below and its producing errors, can anyone help? thanks! [CODE]#include <iostream> #include <string> using namespace std; int main() { char ans; int num; do { string …

Member Avatar for WaltP
0
177
Member Avatar for tomtetlaw

When I try to call wglMakeCurrent, I get an access violation. My program only runs in one thread and one window, and I've got a valid device context and rendering context, I can't see what the problem is. I'm using VC++ 2010 and am running Widows 7 64-bit. [code=c++] static …

0
78
Member Avatar for ravenous

Hi, Firstly, sorry about the large amount of code in this question. OK, so I'm making a C++ wrapper for the [URL="http://www.gnu.org/software/gsl/manual/html_node/Matrices.html"][icode]gsl_matrix[/icode][/URL] struct and its associated functions. To make my approach a bit easier to extend to other kinds of gsl structs, I have a template base class called [icode]gsl_base[/icode], …

Member Avatar for ravenous
1
381
Member Avatar for gujinni

anybody know how to explain this??? set_difference(a.begin(), a.end(), b.begin(), b.end(), result.begin()); std::=is this algorithm??? how thus this code work??? vector<char>=how vectors work??? cassert=how thus this work??? back_inserter(setDifference)->i don't know how this code work???

Member Avatar for gujinni
0
269
Member Avatar for jdstone550

Can anyone see why the function "option3" isn't calculating the values for pmt and totalRetirement? The program runs, but I get 0's for those values. If I remove the function and place the code directly into the case option, the calculations work. [CODE]#include <iostream> #include <string> #include <cmath> using namespace …

Member Avatar for jdstone550
0
99
Member Avatar for arsalanghouri

hello all i am new over here and i have got a project to make sudoku in c++ but i am getting problem to write a code for finding solution for the soduko plz help

Member Avatar for arsalanghouri
0
126
Member Avatar for gujinni

Anybody know how to remove the duplicate characters in turbo c++. the output is like this: enter string1:abc enter string2:bcd result:ad

Member Avatar for theguitarist
0
265
Member Avatar for san-angelo

Hi there, I have joined this forum to ask lots of programming and hardware relevant questions. Well first one is this.... I am a C++ programmer. But I am trying to develop a program(.exe file) that will automatically run when I want to run it. Like I want to run …

Member Avatar for Caligulaminus
0
113
Member Avatar for kagotsky

[B]I have problem when i Run my program .I can't see the results clearly it turns to fast to see, and it goes back to my program. Do you know how to solve this?please...[/B]

Member Avatar for renish khunt
0
171
Member Avatar for bobytch

Hello everyone ok straight to the point i have to do this a text or a word that is blinking and have color and while it is blinking it is automatically changing its color i know how to do a text with color and blinking but i don't know how …

Member Avatar for Ancient Dragon
-4
3K
Member Avatar for jeanyl

Thus someone know how to solve my problem? I am going to make a program which is set_difference without using predefined functions???

Member Avatar for Narue
0
115
Member Avatar for luisFilipe

First let me tell you what my program is doing. its basically a shopping list program. Whereby the user will input the values and it is then inserted into a text file. There will be 3 inputs (Item Description,Unit Price,Quantity Purchased) and is stored into the text file as (Shoes:$200:2) …

Member Avatar for caut_baia
0
94
Member Avatar for abdul04

Hi, i am trying to read from a random access file and display its contents to screen, however when i run the code nothing is displayed. I'm using a struct call "Menu" to store each record in the file and display it as the program moves through the file. Can …

Member Avatar for abdul04
0
155
Member Avatar for Ana_Developer

Hello all, I am having a hash_map with key: char *. I have defined it like this: [CODE] struct eqstr { bool operator()(const char* s1, const char* s2) const { return strcmp(s1, s2) == 0; } }; ... hash_map<char *,map<uint16_t,set<float>>, hash<const char *>,eqstr> symbol_hm; [/CODE] but I get an error …

Member Avatar for mike_2000_17
0
150
Member Avatar for clickspiker23

Im trying to get the smallest number out of a series of user generated numbers. i can correctly get the largest number but i always get the negative 99 for the smallest. im working out of a c++ book that does not provide solutions, i tried to catch the -99 …

Member Avatar for NathanOliver
0
172

The End.