49,761 Topics

Member Avatar for
Member Avatar for fsefsef23

I'm reading from a file into an array of objects i created called Team. The file is written in this format: Shane Vitorino CF 8 8 H H H B B O O K Ben Francisco ....... The first line is the player's name, the second line is his position, …

Member Avatar for fsefsef23
0
248
Member Avatar for deliezer

Hi, I am writing an application in which I make a map of strategies keyed by a string symbol. In order to construct the strategies I pass the constructor a filename, out of which it reads out some data, into an initializing map. It is possible that some data might …

Member Avatar for deliezer
0
299
Member Avatar for Celtrix

What to code? post useful things that you do repetitively on a daily basis(must be non Windows or Mac ) specific that you would like automated but don't have the time to code?(as my machine is too slow to run windows or mac sorry :( )

Member Avatar for Celtrix
0
107
Member Avatar for sha11e

OK....sigh... I need to link to lwinmm to use playsound and stuff Looked around and looked like I needed to do it like this: I'm using Codeblocks [CODE] #include <iostream> #include<windows.h> #include <mmsystem.h> #pragma comment (lib, "winmm.lib") using namespace std; int main() { PlaySound((LPCWSTR) "c:\\Snap ya fingers.wav", NULL, SND_FILENAME | …

Member Avatar for saeedmmmm
0
5K
Member Avatar for Riaz Haider

hey guys... i wanted to know how to make multiple conditions such that each condition has arange of values...i have written the following code but doesnt work help me quick plz. It is aPIC program for monitoring the ADC value and sending to LCD [CODE]if(ADRESL==0x00) {lcddata('O'); DELAY(2); lcddata('F'); DELAY(2); lcddata('F'); …

Member Avatar for Riaz Haider
0
311
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
300
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
142
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
548

The End.