Beginners - December 2018 (Page 15)

by asxxx
How to delete a element of array in dynamic malloc table?
 
I have array like that 211122222 11220212 22222111 111123 222222 1 11111 and after that 211122222 11222212 22222111 111123 2222 2 1 11111 I w...
[5 replies] Last: coder777 Why I trying do this with opposing insert but not everything ... (by asxxx)
by lasas
Distinct binary matrices
 
How do I find the number of distinct n*m binary matrices such that two matrices are identical if and only if one of them can be turned into the other by first s...
[no replies]
Program does not run
 
#include <iostream> using namespace std; template <typename T, int length> class SortedList { private: ostream& put(ostream& out) const; T list ; i...
[4 replies] Last: The problem is that the class Int doesn't have a default ctor, which i... (by Thomas1965)
Linked Lists Confusion
 
Hi, what I am confused about is the insertNode function in this class. Under the first else where it says: if (newitem >= first->info)//e.g., 25 > 3 ...
[2 replies] Last: I'm confused because in the class they declared first like this: node... (by dhayden)
algorithms in arrays
 
Hi, i was trying to find algorithms that would allow me to move in 2 dimensional array above, below and in main diagonal and also that other one. Could you sen...
[1 reply] : up is row +1 or row -1 from where you are. down is the opposite. lef... (by jonnin)
Classes
 
How would I define non static member functions from classes? I keep getting an error saying that first is not a static member if the class. #include <iost...
[1 reply] : Hi, The compiler is trying to interpret this as a function definiti... (by TheIdeasMan)
Battleship C++
 
First time submitting anything, I'm new to coding and new to c++. I know my code probably looks a mess to the experienced eye. I have to write a code as describ...
[4 replies] Last: Heres my end result of this after much trial and tribulation and lots ... (by diggty66)
printing array in function
 
Hey! For this program int rounds(float x) { return x + (x < 0 ? -0.5 : +0.5); //rounds float to nearest int and //returns int value } int main() ...
[1 reply] : To give you an idea... #include <iostream> int rounds(float); void p... (by chicofeo)
Writing into arrays from user input
 
I have a character array 12x10. The array simply needs to contain an O or X to indicate if the seat is occupied. Here is what I have so far, I'll just share t...
[2 replies] Last: Please, could you format your code? Press 'Edit' at the lower right co... (by nuderobmonkey)
String Example
 
Could you please write a program using string.
[1 reply] : #include <iostream> #include <string> using namespace std::literals;... (by mbozzi)
Having trouble with [LNK1169 one or more multiply defined symbols found]
 
This works when combined into a single file, but when I try to split it into main.cpp, BigInt.cpp, and BigInt.h it comes up with the following errors. Any idea ...
[2 replies] Last: I completely overlooked that - Got it now - thank you very much! (by javascripty)
by Cairus
Showing and generating an array from a function
 
I need to generate an array with 25 elements with random numbers from 3-7 and then show them using a function. I keep getting an error on line 20 saying invalid...
[2 replies] Last: ah i have to take out the brackets as well, makes sense now. originall... (by Cairus)
by detro
images on windowss.
 
Hi, i am using the windows.h library, and I've had some difficulties with this. I am trying to show a image in my graphical interface. My program is working, bu...
[8 replies] Last: Oh, I was doing a error of principiant. The error is so idiot that I d... (by detro)
deleting an Object
 
int main() { class B { }; class A { public: ~A() { delete el; } B* el; }; B* b = new B; A a; a.el = b; a.~A(); } ------...
[8 replies] Last: try these: (and check out the <> format button on the side for postin... (by jonnin)
Very confused between pointers and references
 
shouldnt i get the adress for v since its vptr2 is pointing to it? int main(){ int v ={0, 10, 20 ,30, 40}; int *vPtr2; vPtr2 = &v[ 2 ]; cout << &vPtr2<< e...
[4 replies] Last: BTW, note that there are no references in the OP. The & in that code... (by dhayden)
by owmn
Homework Help Please!
 
I need help with this assignment for school, and I am stuck on what the problem is...Any help or guidance is appreciated! My instructions for school: (Circ...
[3 replies] Last: My problem is my code will not compile Then your compiler will be gi... (by MikeyBoy)
Help, two errors
 
I am trying to write code that takes in virtual voids and pure virtual voids. My understanding is that with a pure virtual void you do not include the function ...
[2 replies] Last: Thank you!! I can't believe I missed the typo. I stared at that off a... (by cindl24)
by jlb
What Is a Potentiometer, and How to Choose the Correct Potentiometer?
 
It's a piece of hardware, that has a rotary motion that varies a resistance on the wiper of the device.
[4 replies] Last: I dunno, that wiper of the device comment is clearly not a translation... (by jonnin)
by Tox1c
I need to debug my program.
 
Hello i need some help debugging my c++ program. Thx. #include <iostream> #include <fstream> #include <string> using namespace std; struct contact...
[5 replies] Last: Your functions take parameters. void input(contact s ) input expect... (by Repeater)
Blackjack game
 
I've started to write the beginning of the game blackjack, this is just a menu, but I keep getting errors and I don't understand why? Could someone help, thanks...
[6 replies] Last: Yeah I just realised what you meant sorry (by closed account yvD2hbRD)
December 2018 Pages: 1... 1314151617... 22
  Archived months: [nov2018] [jan2019]

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