Beginners - November 2017 (Page 3)

by ebba
Recursion- counting numbers- homework
 
hi guys! its supposed to do this: 4. Recursion. Write a recursive function called digits that wil...
[2 replies] Last: the problem is each time digits gets called it sets count to a garbage... (by adam2016)
by cash
Convert to C++
 
Can anyone convert this python code to c++. from math import exp, expm1 import os #define ...
[no replies]
Comparing string content?
 
I'm expecting my if statement to comparing two strings but for a palindrome. If you type madam for e...
[3 replies] Last: Try going through it mentally on a short string, say "abc". a is index... (by Ganado)
Error With Double Definitions Resulting from a Struct
 
Hello, I've recently been doing a modified version of my previous address book, but in a more simpli...
[1 reply] : You shall not define variables within headers. If global variables are... (by coder777)
Accessing class member variables from Main?
 
Hello everyone, Assuming i have a class Student that have the following member variables: privat...
[3 replies] Last: whatever you're trying to do in main() with each element of that priva... (by John87Connor)
Unhandled execption error!
 
I am writing a monogram program that allows user to enter full name (first, middle, and last name). ...
[1 reply] : Nevermind, i found the error. I needed this line of code at the bottom... (by mickeraiello)
OOP: Is this polymorphism?
 
My lack of trying to understand these concepts. - the use of the virtual keyword - l've heard is...
[7 replies] Last: @keskiverto thanks for the effort. lm really understand every part of ... (by vincentthorpe)
by Bopaki
I have been battling with this project since from Monday. I do not know why I get these 5 errors
 
I am getting this error when compiling my program: Compiling C:\Dev-Cpp\Chapter5\Today\LlistType\...
[2 replies] Last: here it is #ifndef LINKEDLIST_H #define LINKEDLIST_H #include<iostre... (by Bopaki)
by cash
Convert to C++
 
Can anyone convert this code to a program that uses namespace std and iostream and fstream header fi...
[1 reply] : Is it Python? Before doing any work, have you already tested if it wok... (by Enoizat)
Skipping an input field
 
HI there, I'm currently learning classes within C++ at university and I'm writing a small program...
[1 reply] : getline allows you only to read strings and nothing else. getline(ci... (by Thomas1965)
2D array of vectors
 
Hi guys, can someone give me an easy to understand way on how to do this? I have N² 2d vectors ...
[16 replies] Last: there are 2 ways to implement NxN matrices: 1. you use a container th... (by John87Connor)
Help understanding operator overloading?
 
Im having a really hard time understanding how this section of code works. I get everything in the ...
[1 reply] : Operator overloading is not much different from regular function overl... (by Peter87)
Calling function in main()
 
In this code I've written two functions, which I both call from main(). However, I'm stuck when call...
[2 replies] Last: How do I pass the pointer of the array if it isn't defined or declare... (by Chervil)
How can I enter data into a struct after I pass by ref to a function?
 
Hello, I am trying to enter data into a data structure after passing it by ref to a function. Wh...
[4 replies] Last: Glad it works. Indeed, raw arrays are an exception to what might be in... (by Ganado)
Combat Between 2 Characters using Classes
 
How exactly can I modify the healthpoints of my two characters (mHealthPoints and mHealthPoints1)? I...
[1 reply] : your character class (the base class?) should have a value for current... (by jonnin)
Broken code for arrays
 
Hello, Could you please help me in fixing my broken code? I need my code to accept negative nu...
[11 replies] Last: Hello sr2cute702, This is your code with comments. I will not say tha... (by Handy Andy)
Search value in a map with user input
 
Hi, y'all! I'm stuck with the following problem: I want to get the name of an employee by user input...
[1 reply] : replace const char* with std::string as the key-value-type in the map<... (by John87Connor)
i need help again :)))
 
please tell me why it does not work int x,y,c,n; cout<<"x="; cin>>x; n=0; while(x!=0) {x...
[2 replies] Last: Hello queen13, This should give yo an idea of what your program is do... (by Handy Andy)
c++ coding killing me to much to understand
 
I wrote the following code in vs2005 now i am translating it to vs2017 I cant figure it out. The pr...
[4 replies] Last: sorry i meant just a string "110111101110011010110111011001" of 31 ch... (by nickhere)
Longest Matched Substring confusion / clarification
 
This is more of a "can you help clarify?" ~ the below is the full assignment I was handed, with no a...
[2 replies] Last: @meegsees, You can do it recursively. Consider just the forward direc... (by lastchance)
November 2017 Pages: 12345... 33
  Archived months: [oct2017] [dec2017]

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