49,757 Topics

Member Avatar for
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
176
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
711
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
731
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
459
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
156
Member Avatar for Zssffssz

Well I want to make a DLL but all of the tutorials online seem to focus tword GUI programing or go a little too fast. Can anyone explain it? As far as I have seen it's syntax resembles resource files. And what makes it a '[I]Dynamic[/I] Link Libray' as in …

Member Avatar for mike_2000_17
0
318
Member Avatar for Zssffssz

I already know how to call a program an make it run inside of my program (with no communication between the two). But I need a way too call a separate program from mine and have it run separately. I looked into the CreateProsses thing but it seems to be …

Member Avatar for Ancient Dragon
0
186
Member Avatar for yurigagarin

I tried to scan a text file ( contains decimal numbers) and save all the numbers into 1 array input1[50]. When I ran the code, the printout is always 1.0000 eventhough my text file have a bunch of numbers. Could somebody point out where I did wrong? Thank you. [CODE]VOID …

Member Avatar for yurigagarin
0
257
Member Avatar for RisTar

I don't tend to use Arrays when programming in C++ because I think that vectors are a lot easier to use. The problem is that now I have to use arrays. I'm creating a game using SDL. I'm trying to create the artwork in code using pixels on the screen. …

Member Avatar for RisTar
0
165
Member Avatar for xxunknown321

How do i get my program to read the last ten lines of the ".txt" file? Can you please dumb it down as much as possible. Here is what i have so far: // reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () …

Member Avatar for usustarr
0
8K

The End.