Beginners - May 2019 (Page 13)

how to create multidimensional array of char and int datatype and use it for cin
 
How to create multidimensional array of char and int datatype and use it for cin ? When for i need alphabet and numbers and j will be only numbers. for...
[11 replies] Last: I need first column, i don't know why but in c++ for some reason colum... (by jonnin)
by Ganado
C++17 constexpr char
 
This code gives the following compile-time error: >g++ -std=c++17 main2.cpp -o main2 main2.cpp: In function 'constexpr char func(char)': main2.cpp:5:28: error:...
[4 replies] Last: Very clear, thank you. (by Ganado)
Inheritance Problem
 
Hi guys, I'm having a problem which involves inheritance. I am trying to prompt the user to input dollars and then cents. Once they input the information I p...
[2 replies] Last: Hi IdeasMan, Sorry for the late reply. I will definitely give that t... (by kdrewes)
how do i find complete explanation of resources for c++
 
I am doing these beginer exercises, but when i need something and i read these sites, but even i read completely all sites required there is not enough informat...
[6 replies] Last: Follow the instructions on the ISO C++ Foundation's site: https://isoc... (by mbozzi)
Pointers and Dynamic Memory
 
I'm writing a program that uses pointers and dynamic memory. It will prompt the user for a filename, how many numbers to read (with a max of 20), and a number t...
[6 replies] Last: Thank you to those who helped me! I provided my new code and output be... (by Orion98)
quick question regarding input counters
 
For some reason I can't find out why my input counter isn't working. It is supposed to keep track of how many times I enter in a seat and after the 5th input fo...
[5 replies] Last: I even tested it out myself, the counter works just fine after removin... (by zapshe)
by Qscfty
Help check the code?
 
Write your question here. #include <iostream> #include <vector> #include <string.h> //add other libraries if needed using namespace std; ...
[1 reply] : If you are going to be using C++ strings include <string> , not <str... (by George P)
by vysero
Getting my student grades program working.
 
My book walked me through creating this StudentGrades program and there is a lot of detail into what the functions are doing and how they work which is great bu...
[5 replies] Last: Okay I figured it out. The executable is created for me and lives in t... (by vysero)
invalid user-defined
 
Hello, I have a couple of errors and I can not find the cause, I hope somebody can help me! Thanks Individual.cc: In member function ‘void Individual::setGen...
[5 replies] Last: It's surely confusing that Chromosome has an array of Individual a... (by coder777)
Write Array of a Class to a file -- Overloading << Overloading
 
Hey folks. I am 96% finished with a final project for my first c++ course and I've run into trouble with writing out the array of my class to a file. I have re...
[6 replies] Last: You could replace the emp .outputPayroll(outPut); with outPut << em... (by keskiverto)
Re-write code to use inheritance
 
Hi all, So my assignment is to create 3 classes: Text, Box and TextBox. Text has several values (font, size, color and data). Box has similar values (width, ...
[17 replies] Last: this->weight = weight; perhaps you should use the base class implem... (by ne555)
by Pecvx
Recursive function
 
I don't understand exactly what is going on here when you for example call func("aaa123"). I think it'll first call func("aaa123"), func("aa123"), func("a123"),...
[5 replies] Last: what I don't quite understand, from @dhayden's example, is how we "ge... (by dhayden)
What is meant by this statement
 
bool res = false; cout << "Enter word to search" << endl; string search; cin >> search; for (i = 0; i<line; i++) { size_t found = (data ).find("...
[8 replies] Last: size_t found = (data ).find(" " + search + " "); if (found == string:... (by MikeStgt)
by spd
Requesting structure help
 
Hello. I am new to C++ and am struggling with the Structure format. One of the questions we have been asked is to write a C++ statement storing data for a dest...
[6 replies] Last: you can use getline. If you mix getline with << you need to be ca... (by jonnin)
does not name a type
 
Hello I have an error message among others Chromosome.h:16:5: error: ‘Individual’ does not name a type Individual* sequence; thanks the code for Chr...
[18 replies] Last: Often times, it helps to copy your work into another project, and redu... (by Ganado)
program
 
Which program is best to learn C++, Visual Studio Express or Visual Studio Code?
[5 replies] Last: Thanks you guys for the info!! (by s l i m)
Trying to display genre
 
I'm trying to display the genre of this. It creates the file and add the input file but doesn't display it. It just closes the program without the output. I've ...
[7 replies] Last: So for my data output i get this for the genre 1 album 1999 1 2 alb... (by novice12)
by vysero
Attempting to understand seperate compilation in c++
 
I am working from a book called Accelerated C++ to learn the language. I am currently in the section which talks about how programs are structured to enable sep...
[2 replies] Last: I jumped ahead and they have the final program looking like this: ... (by vysero)
Pushing to the front of a singly linked list
 
Okay, for those of you who saw my previous question, this is different and now I'm following my professor's notes: https://github.com/rambasnet/cs2notebooks/blo...
[5 replies] Last: [quote=mbozzi] Eliminate special cases. Place the head node before the... (by PiggiesGoSqueal)
Determine the number of rows in an array
 
Hi, I have a dll with a function that takes an array as an argument like this void Process(const double price ) What is the best way to determine how m...
[7 replies] Last: personally, to me, a constant is not a variable. (variables... vary).... (by jonnin)
May 2019 Pages: 1... 111213141516
  Archived months: [apr2019] [jun2019]

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