49,761 Topics

Member Avatar for
Member Avatar for jdh1231

Right now, I am learning how to use an Array. How the program should work is, I declare how many numbers I want to input, and then, put numbers in. At last, I can choose either find the maximum, sum, or product. The program seems right to me but it's …

Member Avatar for jdh1231
0
371
Member Avatar for jenbrandau341

Here is my project: Write a program that dynamically allocates an array large enough to hold a user defined number of structures (string name and three double tests). Using a function, the user will enter a name and 3 test scores for each element in the array. Using another function, …

Member Avatar for WaltP
0
229
Member Avatar for dragon_chick

Ok, so for this assignment, we were given a program and a class. We have to find where the program code needs modified and make the changes necessary to use the class. [CODE]/****************************************************************************** Programmer: Date: November 6, 2011 Compiler: Cisual C++.NET Source File: hw7.cpp Action: Reads words from stdin and …

Member Avatar for Moschops
0
300
Member Avatar for valestrom

Hi, I'm trying to make a set of monsters that have values that can be loaded. Like a Goblin having enemyhealth = 50, enemydamage = 15, etc. Here's what I kinda have an idea of doing... But I really have no idea how to use it. (File containing values for …

Member Avatar for valestrom
0
294
Member Avatar for Amir798

hey everyone.. i am a newbie to c++.. please someone tell me that how can i move different objects like circles, rectangles over the screen by using keyboard keys in Graphics mode?

0
49
Member Avatar for bjwittrock

I'm currently working on a implementing a matrix inversion method for a Matrix class in C++. One thing that isn't implemented is a check for when the pivot element is 0, meaning I will need to swap the rows (likely with the row just beneath it). Here is what I …

Member Avatar for mike_2000_17
0
205
Member Avatar for rrr12345

I have been trying to learn CSS for a while now. I have been working in C++ for quite some time now so i thought hey CSS should be a walk in a park but it has proved to be enormously difficult for me. The main thing that seem to …

Member Avatar for super9876
0
177
Member Avatar for iGuardian

This is the question: Define a function that takse a partially filled array of numbers as its arguments and returns the standard deviation of the numbers in the partially fille array. Since a partially filled array requires two arguments, the function will automatically have two formal parameters: An array parameter …

Member Avatar for iGuardian
0
364
Member Avatar for sorrow0o

Hey folks, First poster here :icon_cheesygrin: So we got an assignment and part of it is, to write a stack with an array. So far so good, but I'd like to use a dynamic array that doesn't need the user to input any size. [CODE] void init() { int i; …

Member Avatar for Narue
0
94
Member Avatar for fsefsef23

I have a program that is supposed to count the number of 'comparisons' during a selection sort. I'm having trouble trying to determine what a 'comparison' is considered! It runs the sort properly and sorts in ascending order, but I'm not sure where to put the comparison counter. I'm wondering …

Member Avatar for Narue
0
532
Member Avatar for wnr78ta

I have a simple doubly linked list for a class I am in and I keep getting a seg fault on my last line of code, no matter what i make it. I can put a bunch of random couts and it will print them all then on the last …

Member Avatar for wnr78ta
0
715
Member Avatar for Dakot

Hello all , i have a small problem , i'm writing now a voting program , and i'm a little bit confused , how can i attribute the votes to a certain person? i mean , i enter the value 1 , and this vote must go to the first …

Member Avatar for Narue
0
98
Member Avatar for tedman102

I have made a program to make a rectangle in a text matrix. It begins asking for width and height. The variable must be greater than 2 and a whole number. The only problem is if a user enters a character instead of a number, or a decimal instead of …

Member Avatar for Narue
0
262
Member Avatar for smmcfarl

I am having trouble inputting sample data into an array and am wondering what I need to do to correct this? The input sample is like this: 3 7 9 3 8 2 10 11 4 14 This is the code I am using and is not working. The MAX_SIZE …

Member Avatar for smmcfarl
0
89
Member Avatar for devjeetroy

So I'm making a text editor with syntax highlighting. I'm subclassing richedit and using drawtext to overwrite(Exactly like in Iczelion's tutorials). I was trying to solve the highlighting part, and up till now, I've managed to paint over all of the text(no syntax discrimination). But I've run into a strange …

0
119
Member Avatar for stereomatching

Boost provide us [code]is_base_of[/code] and [code]is_polymorphic[/code] Yet the dynamic type need to be deduce on running time What kind of situations would you use [code]is_base_of[/code] and [code]is_polymorphic[/code] to replace dynamic_cast? Thank you very much

Member Avatar for rubberman
0
138
Member Avatar for jonnyboy12

Hello. I have a game with code like this. [CODE] class manualSetPosition{ public: Ogre::ManualObject * manualDebugger; void SetPosition( Ogre::ManualObject * manual, Ogre::Vector3 mousepos ){ manual->position(mousepos); }; }; [/CODE] Thats a class I use to draw a grid. I build it like this in my project. [CODE] manualSetPosition ManualSetPosition[1226]; [/CODE]this works …

Member Avatar for nickcampau
0
133
Member Avatar for kab5zb

I was wondering if someone could help me write the code for this... I have a text file with 10 lines, one word on each line and I am trying to get a word from a random line and then cout that word. Can anyone help?

Member Avatar for thines01
0
190
Member Avatar for maria536

Ok, I worked on my code so that I can repost it here. This is what it has to do. I also need a static cast which I am not sure where to put it. Thanks for any help!!!! Users should enter each number at an input prompt, then enter …

Member Avatar for maria536
0
140
Member Avatar for duttydane

Create a class called “PROCESSINTEGER” for comparing two INTEGERS. Provide member functions input, isEqualTo, isNotEqualTo, isGreaterThan, isLessThan, isGreaterThanOrEqualTo and isLessThanOrEqualTo. The predicate functions simply returns 1 if the relationship holds true between the two Integers and returns 0 if the relationship does not hold. Also, provide a predicate function isZero. …

Member Avatar for tkud
0
155
Member Avatar for jpd5066

I am assigned the sort-of famous RMS assignment. This is what I have so far, it is just beating me. My biggest confusion is how to add the entries up. I think I will okay with squaring them, dividing the total and obviously the sqrt() at the end. [CODE]#include <iostream> …

Member Avatar for jpd5066
0
570
Member Avatar for ntrncx

hey all i am studying from a book,and i have to do an exercise. i dont want code or anything i want tip or someone explain me how to do it. i have a oldmast.dat file with some records a trans.dat file with records and i have to update the …

Member Avatar for ratatat
0
733
Member Avatar for infantheartlyje

I have a base class and two derived class. One derived class which inherits base class as virtual and another one as non virtual. I have given below my codin. [CODE] // This program uses virtual base classes. #include <iostream> using namespace std; class base { public: int i; }; …

Member Avatar for Narue
0
202
Member Avatar for Azmah

I'm looking at getting started with [URL="http://www.wxwidgets.org/"]wxWidgets[/URL]. I currently use Dev C++ as my IDE for C++ coding. wx Widgets looks very promising and could speed up my development if used. Though what the site doesn't state (at-least none that I've found) is whether it's an IDE of its own …

Member Avatar for Azmah
0
464
Member Avatar for Despairy

after vising cplusplus site and checking my book i havent found any example or explanation... so here it is: i have a function called "string stringreturn()" now inside i have INT LIFE , and INT NUM i would like to return the following "blabla bla (INT LIFE VALUE) bla bla …

Member Avatar for jwenting
0
245
Member Avatar for ChrisMackle

Hey, im new to C++ forums and C++ for that matter. Im 16 years old and want to be a game developer so i made a calculator it took about 30min(a while i know but im a beginner) can someone tell me if what ive done is good code or …

Member Avatar for WaltP
0
184
Member Avatar for valestrom

I want to be able to launch a program using the system command that is located in the same directory as my program, is there an easy way to do this, without having use the getpath function and store it under a variable? Thanks

Member Avatar for thines01
0
87
Member Avatar for Zssffssz

Here's me error:"invalid conversion from 'char*' to 'char'. This is much different than what I found on google because I'm using actual pointers not return values n' stuff. Well heres a watered down version of the code: [CODE]char* LOCK = new char[501]; char ret[501] = "this is fine in program"; …

Member Avatar for Zssffssz
0
533
Member Avatar for da10x

Hi. I am currently writing a block of code to loop through a vector and generate all possible moves on a game. For my first for loop, this block of code never increments x. I even stuck an x = x+1 at the end of the block and it just …

Member Avatar for da10x
0
128
Member Avatar for f4fjks

Assalam u Alaikum! hey guys! can any one here tell me code of Nokia ringtone? or any other? thanks alot!!

Member Avatar for f4fjks
0
161

The End.