Beginners - September 2017 (Page 14)

C++ Programming Homework
 
Hello. I am trying to figure out what is wrong with my program. Currently it is telling me that "C2228: left of '.cin' must have class/struct/union" and "C2181:...
[4 replies] Last: Thank you very much! (by TonyR1234)
by Ch1156
Creating a more concise C++
 
I have been thinking about this for quite some time. I have been using C++ off and on for about 8 or 9 years now and one thing that bothers me is that C++ can b...
[16 replies] Last: Complexity exists underneath so that clarity can exist above. Ever lo... (by Duthomhas)
by pizza
output an array class member
 
Hello guys thanks in advance for your interest! What is the conventional way to output data stored in your array class member? not using a void member function...
[1 reply] : Ideally, you'd overload the << operator so you could say something lik... (by dhayden)
What is the logic behind the THIS pointer
 
Hi! I was looking into the this pointer I found lots of information. But nothing behind it's logic as in why should i use it,how is it used. Also I did find ...
[4 replies] Last: I've given a simplified answer, even because it would have been imposs... (by Enoizat)
by Kappa
My dev c++ keeps crashing
 
So i was typing my code about this payment center using classes, throughout my run i managed to fix the compiler error and once there was no more compiler error...
[8 replies] Last: Returning has nothing to do with IO (cin/cout). Just to demonstrate..... (by Peter87)
Help finding the average.
 
I need help finalizing my code. I cant seem to figure out how to get the average in an array of numbers. The program prompts the user to enter ten integer v...
[1 reply] : Average is calculated as (sum of all values) / (number of values) S... (by Chervil)
by aedt
Do classes destroy all its objects when the destructor runs?
 
Here I have been told to mimic a dynamically allocated int array. Note that uncommenting the destructor causes a crash (double free) /*Write your own integ...
[4 replies] Last: also, your operator= may access out of range (by ne555)
Picross Programming Project Help
 
I am attempting to create a program to play picross. The game is untimed and on a 10 by 10 grid. It is console-based, so the user will have to enter coordinat...
[1 reply] : I’m trying to understand what your function randomPicture() should d... (by Enoizat)
enter like matrix
 
the code works fine but i want to input the values like a matrix but instead it inputs in a weird way. #include<iostream> using namespace std; int main() { ...
[2 replies] Last: #include<iostream> int main() { std::cout << "\nEnter number of... (by Enoizat)
c++ pointer to string
 
hello, we recently reached pointers in my class and that section just blew me away badly. my professor gave us some practice lab to hep us get familiar, I'm hav...
[1 reply] : That's a huge block of text for someone to read on a forum. Think of ... (by Duthomhas)
initializing array to zero
 
why doesn't the code work with an & before arr in for loop.(line 8)Shouldn't it start from initial address? #include<iostream> using namespace std; int mai...
[6 replies] Last: > and if re-clearing it to re-use it: > memset(arr, 0, len*sizeof(int)... (by JLBorges)
How to copy contents of txt file into struct array
 
I have a text file named "student.txt" with 5 identity numbers and five names formatted like this. p00001 DENNIS p02302 ARRON p04503 TOM p30004 RYAN p00003 DAV...
[1 reply] : > I want to create a structure with two member string variables. > st... (by ne555)
The most frequent range of numbers in an array.
 
Hi, I am totally new to programming and forgive me for my ignorance. But I'm looking for code that can show me the most frequent range of numbers in an array....
[2 replies] Last: @DanielsRUS, Maybe I'm slow, but it took me a long time to realise fro... (by lastchance)
How do I prevent a user from inputting anything?
 
Hello fellow humans. I want to be able to disable/enable the ability for the user to input anything to the console. I'm working on a silly text adventure ...
[3 replies] Last: I am not sure that will prevent ctrl+C or alt+tab or other such things... (by jonnin)
by teeper
Collecting input from file
 
I haven't programmed in C++ in a long time and now I'm back in school and taking an intermediate C++ class. I have to do two tasks for my first assignment and I...
[14 replies] Last: I appreciate this Andy! Thank you very much :) (by teeper)
Undefined reference problem
 
Hello everyone, i'm having a problem related to the undefined reference error. The function below return an error during make like: undefined reference to 'li...
[11 replies] Last: Makefile in many directories. The project is not mine. It's an alread... (by Amiplus)
grade-replacement
 
the question is some school have a grade-replacement policy: a student can retake a course,remove the old grade, and post the new grade in the record. using th...
[1 reply] : Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
Data validation
 
Write your question here. Put the code you need help with here.//Assume that this is my structure. struct customer { string firstname; string las...
[3 replies] Last: Thnx Handy Andy and Enoizat.. I appreciate your help.. (by closed account iyRG3TCk)
Working with compilers for errors-Adjacency matrix
 
Errors: So I have errors that I need help fixing for c++11. This deals with undirected graph in the format of adjacency matrix. prompt: Write a C++ 11 functi...
[2 replies] Last: Ok So I needed to just ad using namespace std; in header file. remain... (by closed account Sz6592yv)
by dimit
Difference between char and wchar_t
 
In a simple program we declare a char and a wchar_t variable. We initialize them using some values. And we display the output using cout. char value=55, wi...
[1 reply] : wchar_t does the same job as char but it can store more characters (o... (by coder777)
September 2017 Pages: 1... 1213141516... 21
  Archived months: [aug2017] [oct2017]

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