48,985 Topics

Member Avatar for
Member Avatar for Talguy

I can write a procedural application fine with graphics just fine. I have a new project where I am finally going to learn how to code with concurrency in mind. So I want to make an alarm clock that can have repeating alarms and selectable alarm tunes through itunes or …

0
62
Member Avatar for panagos

I try to find a way to find the minimum of an array of numbers different type (int,float,double..) i have written this [CODE] #include <iostream> #include <vector> #include <iterator> using namespace std; template <class T> T min(vector<T> a()) { int i = 0; T min = a[0]; vector<int>::iterator it; for( …

Member Avatar for dusktreader
0
187
Member Avatar for gowth08

Hi all, My code for SHOP is as follows, problem description [url=http://www.spoj.pl/problems/SHOP/]here[/url]. [code]#include<iostream> #include<queue> #include<climits> using namespace std; class pt{ public: int _x,_y,_cost; pt(){} pt(int x,int y,int z):_x(x),_y(y),_cost(z){} int print(){ printf("%d %d %d\n",_x,_y,_cost); } }; int dx[]={0,-1,0,1}; int dy[]={-1,0,1,0}; int main( ) { int M,N; while(scanf("%d %d",&N,&M)!=EOF){ if(!M&&!N)break; bool flag=false; …

Member Avatar for Ancient Dragon
0
163
Member Avatar for GooeyG

This program involves tree structures. I need to teach the program three new animals. Also, i need to ask several new questions to guess the right animal too. The problem that I'm having is that I don't know how to get the question to come up when the user enters …

0
49
Member Avatar for asa88

here is my class file: [CODE] #ifndef BANGER_H #define BANGER_H class Banger { private: static int objectCount; char* driver; char* car; int hits; bool mobile; public: Banger(); Banger(char*,char*); Banger(const Banger &obj); void setDriver( char* ); void setCar( char* ); void setHits( int); void setMobile( bool); char *getDriver(); char *getCar(); int …

Member Avatar for asa88
0
115
Member Avatar for Kennych

~I need to do the following ~ Take Input from number assign it to variable maxNumber ~ Create variable called randomN and assign a random number from 0-maxNumber to randomN -C++ Please need help thank you.

Member Avatar for Ancient Dragon
0
59
Member Avatar for SpyrosMet

Can anyone please tell me how to create a simple window? If possible can you provide an example? Thank you.

Member Avatar for Ancient Dragon
0
99
Member Avatar for weaslem32

I need help with an assignment. I have to modify the program below to determine the number that was entered the most times in a row and display the output. I can not use files or arrays. I am having trouble with the logic and need some guidance. Thanks. [CODE]#include …

Member Avatar for dusktreader
0
73
Member Avatar for scott6480

I am having trouble with myRectangle2 taking the values I am assigning to it. The myLine2 value works just fine. Can anyone spot what I am doing wrong? I have stared at this for too long and now I am second guessing everything I have already done. Any help is …

Member Avatar for WaltP
0
128
Member Avatar for BobbieJean

Hello, I'm new here but I need a little help please. I've gotten this program to mostly work correctly except for what seems like one small detail. My program is supposed to ask the user to enter a file name, open it and display its contents 24 lines at a …

Member Avatar for WaltP
0
651
Member Avatar for SpyrosMet

I was wondering if [CODE] *pntr.age = 19;[/CODE] is valid considering that pntr is a pointer to an object that has age as a varible. If it is valid, can it be used with an array of pointers to objects? if yes can i get an example please? thank you.

Member Avatar for mrnutty
0
99
Member Avatar for Mono15591

I haven't ran it for a while now and now I need to register it BUT the link it has to register doesn't load anymore...the site loads but all I get is a stupid loading animation for the product key. it's been going for 20 minutes now. I've tried multiple …

Member Avatar for totalwar235
0
79
Member Avatar for lsandling

I guess I am really having trouble with what's inside the function How do I get it out.. Suppose I ask a yes or no question and if the answer is no then break if the answer is yes then compute that formula. okay [CODE] int ThingYesNo; doubleThingHeight do { …

Member Avatar for lsandling
0
112
Member Avatar for ahaykal

Hello i am new here i liked this community: I have a c++ homework could you check it if it is correct? 1. Rewrite the following loop so it uses pointer notation (with the indirection operator) instead of the subscript notation: [code] for (int x = 0; x < 100; …

Member Avatar for nezachem
1
479
Member Avatar for philipbas

i don know about class n pointers,can u explain it with essy examples please

Member Avatar for dusktreader
-2
80
Member Avatar for fenerista

I have GradeBook.h that include class interface, GradeBook.cpp that include class implemantation, I want to make a lib file and use it with GradeBook.h on the other project. How can I do that ? I am using Windows 7, VS 2008

Member Avatar for fenerista
0
259
Member Avatar for SamStradling

I am getting the error error C4716: 'ReStart' : must return a value can anyone help? thanks [code]int ReStart(int id);[/code] [code]PushButtonAdd("Transparent",90,300,ReStart,11);[/code]

Member Avatar for harryhaaren
0
163
Member Avatar for mikabark

When I want to save result to file I use ofstream, right? [CODE]ofstream myout; myout.open (sav_fl, fstream::app); [/CODE] But depending on the "ol" value(=user input), I want to show it to screen not to file. How can I do? I thought this way. But error message shown up. [CODE]if (ol …

Member Avatar for mrnutty
0
84
Member Avatar for SpyrosMet

Hello. I need some help with a project of mine and the thing is that I have the class organisms that has two sub-classes: animals and plants. Animals has two subclasses itself: Carnivores and Herbivores. I have succeded in including the plants header file or cornivores header file or herbivores …

Member Avatar for SpyrosMet
0
114
Member Avatar for deorcar

hi im working with opengl/sdl and im still new to it what im trying to do is to make a 2nd box or sprite that will follow the frist box ive made can anyone help me out here is some of the code i have [CODE]#include "sdl.h" #include "GL_Functions.h" #include …

Member Avatar for Skeen
0
124
Member Avatar for atticusr5

Hey everyone, I have this assignment for my C++ class and I need to sort some data I have data in a file in this order: some 10 digit int -the account id some name -the account name some balance -the account balance basically I want to sort the data …

Member Avatar for atticusr5
0
106
Member Avatar for Roger_Hades

Hi everyone! I've been working on this code for 2 days(got half of it from the web) [code] class name { string name1; public: name(string s) //set name { name1 = s; } string get() //get name { return name1; } }; // Define less than relative to name objects. …

Member Avatar for Roger_Hades
0
158
Member Avatar for Szabi Zsoldos

Hey, this is my first post here, glad to be here and learn from you guys! what i'm trying to do is this: I would like to enter 2 names and then hit a number from lets say 1 to 10, and i have the array Q1,Q2... etc. these should …

Member Avatar for jonsca
1
369
Member Avatar for VilePlecenta

upon trying to save or view the code when I generate a dialog box in vs 2010 beta 2 I get a nice [URL="http://yfrog.com/jmdialogerrorp"]Little Error Box[/URL] That pop ups and prevents me from saving or editing the source at all leaving hours wasted making it in the first place. I …

0
53
Member Avatar for V0ldemort

[CODE]LPCWSTR name; name += TEXT(".png");[/CODE] produces:'+=' : illegal, right operand has type 'const wchar_t [5]' I want to have .png appended to the name string. Anyone know how to fix it?

Member Avatar for thelamb
0
59
Member Avatar for xiaodi
Member Avatar for WaltP
-1
40
Member Avatar for kppowell

Hey, im Keith and im 15 years old. I like computers alot and im pretty good at making websites, so this year i signed up for computer science. Our teacher is teaching us how to wrote programs using C++ and i love it, but i was wondering, why are they …

Member Avatar for sonu babu
0
274
Member Avatar for manchesterutd

Hey guys, I really do not know on how to start this loop logic structure. Can anyone give me a rough idea on how to go about it? The question is : Develop a solution to calculate a student's grade average for one semester. The letter grades should be entered …

Member Avatar for WaltP
0
74
Member Avatar for Dragonsreign

[code] /* * This program displays "I Love C++" to the Standard Output */ #include <iostream> int main () { std::cout << "I Love C++"; return 0; } [/code] I just DLed and Installed Cygwin and Netbeans using instructions from: [url]http://netbeans.org/community/releases/65/cpp-setup-instructions.html[/url] I did see that ths "type" of problem has …

Member Avatar for Dragonsreign
0
920
Member Avatar for d2dupes

So here is my program: [code] #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { string lotName, bidder1_ID, bidder2_ID; double reservePrice, bidder1_bid, bidder2_bid; cout << "Enter lot name: "; getline (cin, lotName); cout << "Enter a reserve price: cin >> reservePrice; cout << "Bidder #1, enter your …

Member Avatar for VernonDozier
0
77

The End.