General C++ Programming - April 2013 (Page 45)

using OOP to implement matrix class that provide the basic matrix operations
 
i want to know how i can solve this question? do i need to create a class or write the program codes, i dont understand it
[12 replies] Last: please im so sorry ajh32, i didnt receive any of your message, thank y... (by Amima 2)
by Daleth
Just a quick question out of curiosity
 
Has anyone ever attempted writing a complex program on a single line to see if he or she could do it?
[3 replies] Last: Aha, nice nice, thanks for that E: Another bool isp_2(int num) { ... (by Smac89)
Pointer Problems
 
I'm trying to fix this problem that I have with pointers but I'm getting the message (error: request for member `print' in `ofstrings', which is of non-class ty...
[9 replies] Last: Thanks for your help guys I was able to work it out. (by Gulopey)
SDL and SFML
 
I understand that these two are based a lot on preference. SDL is lower level and made for C. SFML is based for C++. One thing I keep hearing a lot is that SFML...
[4 replies] Last: I know SFML-2.0 quite well (Don't go 1.6, it's a few years old, 2.0 is... (by Bourgond Aries)
List Reverse C++
 
So I'm given ListNode and list to be modified by adding a member unction named reverse that rearranges the nodes in the list so that their order is reversed. I'...
[no replies]
by Tresky
Clearing a Map of Pointers
 
Hey guys, I was wondering... is this considered safe? map<string, int*> map; int i = 10; int j = 15; map.emplace("one", &i); map.emplace("two", &j); map.c...
[9 replies] Last: Okay thank you so much! :) I really appreciate it. (by Tresky)
How can I iterate through a for loop randomly?
 
So I have a vector that I want to iterate through randomly , and by random I mean that each element is only accessed once but I don't want to shuffle the vec...
[3 replies] Last: > Shuffle a vector of indicies and iterate that. C++11: shuffle a vec... (by JLBorges)
Sweet mother of magical sort functions, can somebody explain this?
 
I wrote this sort function while absolutely sleep deprived, and it makes absolutely no sense to me. It seems to go off the back end of the array (list) when the...
[3 replies] Last: Hey, I thought people would be more interested in this. I think it des... (by tehbailey)
by telad
HELP hotel program
 
Hello, I wrote the program for a hotel using the stack, the user enters the full name and then enter a room with one bed or two and then prints the program full...
[3 replies] Last: I personally think your program is way too complicated and horrible to... (by Donanza)
by Jace
Function issues
 
#include <iostream> #include <cwchar> #include <string> #include <Windows.h> using namespace std; #include <shellapi.h> #pragma comment(lib,"shell32.lib") stat...
[3 replies] Last: Thanks, I took all your advice into consideration. Here is my functio... (by Jace)
by na7937
Array
 
Develop a function that finds the greatest difference between two consecutive elements stored in an array. Develop a 9 element array of doubles to test your cod...
[8 replies] Last: You could always make maxnumber -999999 etc. and leastnumber bigger. A... (by greenleaf800073)
Segmentation Fault Problem
 
I have a pointer to a Level class and when I change level I want to delete that pointer (to free the memory) and construct a new Level with the same pointer cur...
[6 replies] Last: You claim that the segmentation fault occurs when you delete the poin... (by martianxx)
Quick C++ Function Problem
 
Hey forum, I have done all of the assignment so far except for one part. Here is the assignment: Write a program that calculates the average number of d...
[4 replies] Last: Thanks for the help guys, I managed to get it working! =) (by omiexstrike)
getting strange print out for calculation of volume
 
// DEBUG3-4 // This program contains a class for a cylinder // Data members are radius and height // The volume is calculated as pi times radius squared t...
[1 reply] : ¿what's strange? (by ne555)
array problem
 
Write a program to print out the input n numbers in ascending order by using the following sorting method. a. Exchange sort b. Inserting sort c. counting sor...
[13 replies] Last: damn walking keyboard (by ne555)
Runtime polymorphism
 
class Base { ..... ..... ..... virtual void display(); } class Derived { ............... ......... void display(); } int main() ...
[6 replies] Last: By the way, the idea behind polymorphism is to be able to perform oper... (by moorecm)
table of numbers from 50 to 150
 
in this we have to show table of 50 to 150 like 50 table from 1 to 10 then 51 table ......150 table i just want to know is there any way i can get this using ...
[11 replies] Last: #include <iostream> #include <iomanip> int main() { for ( int n = 1... (by vlad from moscow)
Values getting stuck in memory???
 
I have a school project where I have to create a class with 2 attributes that default to 1. To verify that they are at 1, I have a cout before any user inputs ...
[10 replies] Last: You're welcome. Glad it worked out :) (by MikeyBoy)
Your Thoughts on My Library (1,2)
 
I've been working on a little functional library. It's really small. I've focused on keeping it simple. I plan on showing some of the features and hopefully ...
[27 replies] Last: I had hoped that from my enum example you would have realised how to a... (by LB)
C++ Sequences of Dimes and Quarters Function?
 
I'm completely lost with this function I'm supposed to write. My Comp Sci teacher is terrible. I appreciate any help. // changeWays: // counts the number o...
[12 replies] Last: The trick is to fill the entire array based on just a few known values... (by booradley60)
April 2013 Pages: 1... 4344454647... 53
  Archived months: [mar2013] [may2013]

This is an archived page. To post a new message, go to the current page.