49,757 Topics
| |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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? | |
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 … | |
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. … | |
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> … | |
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 … | |
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; }; … | |
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 … | |
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 … | |
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 … | |
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 | |
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"; … | |
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 … | |
Assalam u Alaikum! hey guys! can any one here tell me code of Nokia ringtone? or any other? thanks alot!! | |
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 … | |
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 … | |
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 … | |
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. … | |
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 () … |
The End.