49,761 Topics

Member Avatar for
Member Avatar for Kesarion
Member Avatar for m4ster_r0shi
0
544
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
150
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
164
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
108
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
183
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
173
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
107
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
77
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
247
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
98
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
123
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
264
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
110
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
168
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
112
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
92
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
152
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
149
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
170
Member Avatar for gecko_dev

Im a computer science undergrad student in my final year. its time for selecting my final year project. I have two projects in my mind which are as follows 1- create kernel for iPhone based on openiboot 2- create an iPhone to android code conversion tool The first project was …

Member Avatar for L7Sqr
-1
254
Member Avatar for TheWolverine

Hi all, I've been struggling with something for a number of weeks now and I just can't seem to solve it. I've got a bit of code that looks as follows: [CODE] class classA { public: classA( ); ~classA( ); classBBase* pointerToClassBBase; protected: private: }; class classBBase { public: classBBase( …

Member Avatar for TheWolverine
0
396
Member Avatar for bimoweemo

Hello, I am trying to write a function that will read an array of numbers with the count of the numbers. I want to take the numbers and assign them to letters.Then print out the counts of A's, B's,C's,D's and F's. What i have isnt finished but im really frustrated …

Member Avatar for bimoweemo
0
121
Member Avatar for Rupindersingh

I am new to windows programming, I was trying to compile the following code and it gives me the following errors: C:\Program Files\Microsoft Visual Studio\MyProjects\hook\hook.cpp(14) : error C2065: 'KeyboardProc' : undeclared identifier C:\Program Files\Microsoft Visual Studio\MyProjects\hook\hook.cpp(22) : error C2373: 'KeyboardProc' : redefinition; different type modifiers C:\Program Files\Microsoft Visual Studio\MyProjects\hook\hook.cpp(30) : …

Member Avatar for Rupindersingh
0
349
Member Avatar for heavy.is.happy

Hi. I've made a code. The code is not 100% working, so i ned help with that. The tiny litle program is gonna work so it move the mouse, and then click with it. Both right and left click. And i don't know how to do that? [CODE]#include <iostream> #include …

Member Avatar for thecoolman5
0
705

The End.