General C++ Programming - October 2015 (Page 23)

by BH11
Creating a matrix from a list of equations
 
Hello, I was wondering if its possible to create a c++ program where a set of 3 variables each have a value. A list of items each contain a different value for...
[3 replies] Last: Thanks for inputs, I'll use what you guys have said and research how t... (by BH11)
by Beju
Simple inheritance question
 
Hello all! I would like to ask for your opinion on possible solutions for my problem :) I have a class like this: class Writer { public: ...
[7 replies] Last: Thank you all for the suggestions! :) The "Base from Member" solution ... (by Beju)
by pep101
Priority on parameters using subclasses
 
Hello people, I'd like to make many child classes (say B, C, D, ... with a common parent A) respond the same message "doSomething" using polymorphism in this w...
[1 reply] : Cannot reproduce: #include <iostream> struct A { virtual void doSo... (by MiiNiPaa)
bad_alloc exception after call to function
 
void display(FlexArray f, ostream& out, int lower, int upper) // POST: display list of id and name pairs to desired output stream from lower to upper { stri...
[2 replies] Last: std::copy(other.list, other.list + other.size, list) will copy the s... (by helios)
Project about timer with laps SOS 😭😭 beginner here
 
I have a project. The problem is make a timer. When the user hit enter key, the program will display a lap. Help anyone 😭 I'm a beginner. I have my timer...
[9 replies] Last: It's not about the intervals of the key press. its the elapsed time in... (by littlefrankeinstein)
by helios
Odd function resolution
 
Given: class A{ public: Foo foo() const; virtual void foo(Foo &) const = 0; }; class B : public A{ public: void foo(Foo &) const; }; //... B *b...
[4 replies] Last: I see. Thanks. (by helios)
by Winsu
constructor from a string literal fails
 
I'm trying to create an custom array...but I'm having trouble with my constructor from a literal....if I compile without doing a call from a string literal it...
[4 replies] Last: length() function doesn't include the null terminated character? No... (by cire)
Segmentation fault
 
Needed some help with a c++ program with segmentation fault. Unfortunately Can't post the code here. Anyone willing to find out the mistake? and post the answer...
[18 replies] Last: Ah well, sleep on it then ZZZZzzzzzz....... (by TheIdeasMan)
Impossible homework assignment, please help...
 
I know this is very long and I'm not asking anyone to do my homework for me but I'm having trouble getting started and just making the original EM array... If y...
[4 replies] Last: Sorry for such a late reply but we got it! Thanks for your help, your... (by dakman96)
how do I subtract the ascii value of 'A' from a string array?
 
I am trying to perform a count of occurrence of the letters of various string arrays that are passed from reading in a file: I was given the following exampl...
[3 replies] Last: ¿who did the ` IncrementLtrs()' function? That function already takes... (by ne555)
Audio over Ethernet
 
Hello. I just want to transmit a voice-quality audio stream from one PC(PC 1) to another(PC 2). But I don't understand how PC2 can get this audio and playback...
[1 reply] : I don't know much about these things, but a quick search came up with ... (by kbw)
Networking, sockets and cross compatability
 
So, I'm developing on a Linux machine but my stuff is going to be run on both Windows and Linux. I need to write cross compatible networking code so a Windows c...
[2 replies] Last: Thanks. (by RealGiganitris)
by sami01
How can I use class, constructors and destructors while drawing a circle?
 
How can I use class, constructors and destructors while drawing a circle? especially please tell me where should i initialize initgraph. Thanks! class sha...
[2 replies] Last: O sorry guys, I actually wanted to write "circle" instead of "graph" p... (by sami01)
Tower of Hanoi
 
Please Help me. I want to make a program to solve tower of hanoi. But not using recursion and binary. Can you continue it? #include<iostream> using namespace ...
[3 replies] Last: Search on "tower of hanoi non recursive algorithm" Yields: https://en... (by kbw)
stack
 
Hello everyone. I'm now writing a code that does some actions with a stack. Actually it's ok, but I have a problem here. I have a stack and I need to copy its e...
[2 replies] Last: but none of them was answered (by The suffocated)
compare c string using pointer
 
int compareString(char str1 , char str2 ) { char *p1 = str1, *p2 = str2; // create two pointers // assign them to the strings // HINT: Loop through pair...
[1 reply] : So what's the game? I did your reverse strong one and now you're playi... (by closed account 48T7M4Gy)
Help with the Loop
 
Hi guys, i need help with the looping. where shoild i put the cout<<"\nWould you like to have another transaction? [y/n]"; cout<<"\nEnter your choice:"; ...
[1 reply] : Surely after writing all that code and all the help IdeasMan has given... (by closed account 48T7M4Gy)
Curious concept of self adapting values
 
I'm a totally not knowledgeable person, But I had an interesting idea to make a number class that adjusts the type and size of a number depending on the need, ...
[5 replies] Last: I assume the float entity coordinates are relative to the chunk that ... (by MiiNiPaa)
ATM Code
 
Hi guys, please take a look at my code. #include<iostream.h> #include<conio.h> #include<string.h> main(){ clrscr(); char name ,c1,c2,c3,c4,c5,c6,c7,...
[18 replies] Last: What did you make of the link I gave you? (by TheIdeasMan)
reverse string
 
#include <iostream> #include <cstring> using namespace std; // function to reverse string str1 and copy it to string str2 void reverseString(char str1 , c...
[1 reply] : #include <iostream> #include <cstring> int main() { char str1 =... (by closed account 48T7M4Gy)
October 2015 Pages: 1... 2122232425... 27
  Archived months: [sep2015] [nov2015]

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