49,761 Topics
| |
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, … | |
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 … | |
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 :( ) | |
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 | … | |
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'); … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 & = … | |
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) | |
[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] | |
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? | |
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 … | |
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 … | |
Hi, how can I make program execute code when I will turn my PC off or hybernate him? | |
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 < … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
thus iterators predefined functions? I am confuse between function and predefined functions. | |
Hello, Where can I find the source code/implementations of STL library? Thanks. | |
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); … | |
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! … | |
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. | |
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 … | |
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 … | |
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 … |
The End.