49,757 Topics

Member Avatar for
Member Avatar for milan2011

Hi, I am trying to read two strings per line and store them in strings so i can use them in my program.for example if this is my input file: [CODE]cat:yellow dog:blue chicken:red[/CODE] i wan to store cat as animal1 string dog as animal2 string and yellow as colour1 string …

Member Avatar for Lyandor
0
168
Member Avatar for clickspiker23

Im trying to output the population increase for a population. the problem is my for loop doesn't increment or add correctly. here is a sample output. i made it easy with no death rate and a population of 100 to easily calculate the increase in my head. Starting Population: 100 …

Member Avatar for m4ster_r0shi
0
135
Member Avatar for Syrne

So I'm fairly new to C++ and I'm wondering if this would be possible and what the code would look like. I'm trying to create an ongoing process that monitors when a certain program does something and launches another program when that thing happens. Example: I have Steam open and …

Member Avatar for Ancient Dragon
0
274
Member Avatar for sha11e

[CODE] #include <iostream> using namespace std; void someFunction(bool& a); int main() { bool a = true; someFunction(a); if( a ) cout <<"a = true"; else cout <<"a = false"; } void someFunction(bool& a) { a = false; } [/CODE] This will print out "a = false". bool& a in the …

Member Avatar for pseudorandom21
0
270
Member Avatar for munitjsr2

PLease help me with these questions, I was interviewed for thses just today Q1)Can we delare constant data members inside a class? Q2)does friend function violates encapsulation/data hiding? Q3)what are the types of polymorhphism you know? Q4)why do you need virtual functions? Q5)Can we do something like\ int & = …

Member Avatar for kanuxy
-2
184
Member Avatar for yobbko

I have .xls or .xlxs and there I have Bar with number and text.... I want to use number and text form this file.... e.g. boys in class (cell on form) 24 (other cell on form)

Member Avatar for Tellalca
0
123
Member Avatar for MoNaLiZaOman

[B]Hello all I am a student majoring in Beginner Software ENGINEERING I do not have much experience in game development n has asked us to develop a game I hope 2 to get some help here even sources that need to extend it And thank you all[/B]

Member Avatar for Tellalca
0
97
Member Avatar for jack1234

I am using visual C++ 2005(native C++) I got the error error C2065: 'CString' : undeclared identifier for the following code, [CODE]#include <cstring> using namespace std; int main(){ CString ab; ab="a"; }[/CODE] what is the problem?

Member Avatar for Yellaiah
0
10K
Member Avatar for marcux

Hi all! I have been hacking some Qt before, but now I want to try to code in Gtk and std C++. I have been searching the web but I can not realy find what I am looking for. As I can see Gtk is written in C. Is it …

Member Avatar for GreenDay2001
0
217
Member Avatar for u8sand

I programmed this vector class to support different types and different amount of dimensions. (class T,int D) D is the dimension. I don't use templates much and I'm running into an error, my constructors aren't working. Here is my class [CODE]#include <stdio.h> #include <stdarg.h> template <class T,int D> class Vector …

Member Avatar for mike_2000_17
0
245
Member Avatar for senergy
Member Avatar for ktsangop
0
140
Member Avatar for ktsangop

Hi everyone! I am using a dll to hook keyboard strokes for my application. The hook works fine, but now i want to disable some keystrokes while my application is running. So i did the following : [CODE]_declspec(dllexport) LRESULT CALLBACK KBHookProc(int Code, WPARAM wParam, LPARAM lParam) { if (Code < …

Member Avatar for ktsangop
0
1K
Member Avatar for jadzrev13

Hi, I am making an student registration program as my project in school. But I had some problems making it. Our professor asked us to make an program where there are lists of subjects offered. Then the student will choose what subject/subjects he/she likes, then it will be computed. The …

Member Avatar for jadzrev13
0
3K
Member Avatar for Riteman

I created a small c++ program. Now i wanted it to create an .exe file. Once i compile, i get the exe file in my BIN folder.. but, the alignment of the files are not correct. Well i do get the correct alignment in turbo c++ compiling..(ctrl + f9).. but …

Member Avatar for thecoolman5
0
167
Member Avatar for thecoolman5

hi, i am writing a program that keeps track of the money in my debit card account. i need the program to be able to pull out a value (such as 1.56356) from a text file, round it to the nearest hundredth, and put it back into the file. any …

Member Avatar for m4ster_r0shi
0
465
Member Avatar for busty043

anyone can you help me to my C++ i cant take the error everytime i make a program i got error and can you give me a program that can solve the area of Circle In Turbo C. thanks

Member Avatar for Narue
-2
141
Member Avatar for rayden150

I made several functions, and this one assignment keeps giving me "expected primary expression before '..., HELP!", what is a primary expression?, all my code is ok I have made different files for the different functions and im using extern but the void argument I think keeps giving me trouble …

Member Avatar for Moschops
0
959
Member Avatar for gujinni

thus iterators predefined functions? I am confuse between function and predefined functions.

Member Avatar for gujinni
0
101
Member Avatar for winecoding
Member Avatar for tubby123

Hey, i found quite a few methods to [B]ADD TWO NUMBERS WITHOUT USING THE + OPERATOR[/B] , but this one is extremely weird. What does this printf statement mean ? What is %*d ????? [CODE]#include< iostream > using namespace std; int main() { int a,b,sum; scanf("%d",&a); scanf("%d",&b); sum=printf("%*d%*d",a,a,b,b); printf("\n"); printf("%d\n",sum); …

Member Avatar for tubby123
0
163
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
274
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
80
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
545
Member Avatar for Kesarion
Member Avatar for m4ster_r0shi
0
543
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

The End.