Beginners - April 2019 (Page 7)

What i´m doing wrong undefined reference to `GetFirstParam(st
 
Hello, whats wrong on this ? Thanks for help std::string cmdstr = "start/next/end"; std::string cmd = ""; cmd = GetFirstParam(cmdstr, '/');...
[2 replies] Last: you need a function header or to call it after (below, top to bottom) ... (by jonnin)
Replacing capital letters with lowercase letters
 
I tried the code below and it does not budge although it compiles #include <iostream> using namespace std; void mess(char ); int main() { char s...
[1 reply] : Replace lines 22 and 23 by str = tolower(str ); Yo... (by lastchance)
Header Files and Using Methods Located in Other .ccp Files
 
I am getting an undeclared identifier error on lines 8, 15, and 16 of on Will_lib.cpp it shows up here as line 50, 57, and 58 // overtime.cpp : This f...
[3 replies] Last: > I am getting an undeclared identifier error ¿which identifier? (¿w... (by ne555)
Tutorials for utilizing a structure in a monster battle/adventure program?
 
I have been unable to find any tutorials which utilize structures for a monster battle/adventure program. It seems that classes are utilized the most in thes...
[1 reply] : A structure is the same as a class, except the default access is publi... (by helios)
by daveed
How to read a file into pointers
 
I am trying to read a file using two separate classes: Book.cpp and Warehouse.cpp. Book is the objects and the Warehouse is basically a collection of Books. H...
[4 replies] Last: use github or similar, or just post the top errors, but don't go parap... (by ne555)
the role of preprocessor directives in c program
 
What is the role of preprocessor directives in c program? What if, we don't use it?
[4 replies] Last: I tend to suspect something fishy with posts like this, but I couldn't... (by closed account z05DSL3A)
Finding The Most Common Value and its Count in a Array of Random Numbers
 
This program I'm working on generates an array of random numbers, then outputs the most common number in the array and how many times it appears. I already mana...
[2 replies] Last: #include <iostream> #include <iomanip> #include <ctime> #include <cst... (by lastchance)
new without delete?
 
How come this code does not require a delete or delete after the instantiation via a pointer and the keyword new was used (line 21, 26)? Thanks #include...
[5 replies] Last: Human* firstMan; // gives me an error firstMan->name = "Adam"; W... (by keskiverto)
by Bopaki
Program does not print the elements of the copied stack
 
The original stack (myStack) prints elements well on the screen. The copied stack (yourStack) prints nothing on the screen> #include<iostream> #includ...
[4 replies] Last: I simply re-pushed all the elements from myStack and the program work... (by TheIdeasMan)
by TJW
Find multiple modes in an array
 
I tried to write a function to find the mode(s), but it didn't print out the correct mode(s). The code and example are as below. Thank you for your time. ...
[6 replies] Last: modeCounter=0, //Array size. modeNumbers ; //Create an array t... (by lastchance)
Access Violation
 
I just completed a project and I thought that I was done and now I am getting an exception thrown that says: Exception thrown at 0x7793D9CB (ucrtbased.dll) in ...
[3 replies] Last: The copy constructor is how my instructor set his up in his example. I... (by stoneJax)
by Yogib
nested if else. can someone help me?
 
there's clearly something wrong with my if else statement. i see that that values for letter and message.at(m) are updating but no dice on my translation sting...
[1 reply] : if (letter == 'A' || 'a') Hi that code doesn't do what you think i... (by TheIdeasMan)
How do I read from a file and display it to the user?
 
I have a file (input2.txt) that looks like this: (https://imgur.com/a/Ey4qBpw ) And I want to open that file and store it in a 2d dynamic array. This is in the...
[2 replies] Last: Yes! Thank you, that helped a lot! (by avatar133)
how does this work (1,2)
 
this doesn't do anything. it does not open a txt file and print anything in it. std::ofstream myfile; myfile.open("Array.txt", std::ios::out | std::ios...
[21 replies] Last: To clarify before Helios gets on my ass about this too. I was joking w... (by closed account N8MNAqkS)
by rsp19
Debug assertion failure
 
I continue to have this error stating Expression: string subscript out of range when trying to run a C++ program I have tried to debug however, the error con...
[6 replies] Last: It works great now, except I cannot get the right numbers that the num... (by rsp19)
AP project Ideas?
 
I have to make a program using C++ for my AP class. There are a bunch of requirements for it though and one of them is that it needs to have an algorithm that h...
[8 replies] Last: Dhayden That might work but I don't even know the first thing about ... (by Warzombie3701)
Formatting an Array of Random Numbers
 
I'm writing a program that generates 50 random integers (in the range of 0 to 100) into an array. The thing I'm having trouble with is formatting the array of 5...
[4 replies] Last: ...then outputs the most common integer in the array and how many tim... (by MikeStgt)
Read in Data from a File to Create a 2D Array
 
I posted about this last week but the solution didn't provide me enough clarity so I'm hoping this time works out better. My assignment is to read in a text fil...
[4 replies] Last: Yes that worked very well and I intuitively understood it as well. Tha... (by acscicplusplus)
Assignment
 
Write your question here. Create a class called student. This class contains data members for name, roll no, and CGPA of a student. Provide a no-argument ...
[5 replies] Last: @jlb, Thanks for the input. I did not understand correctly that the c... (by Handy Andy)
Why doesn't this compile?
 
Very basic, but... why doesn't this compile? map<string,double> dow_price = { {"MMM",81.86}, {"AA",34.69}, {"MO",54.45} };...
[8 replies] Last: Yes, they're completely different. std::find() is implemented basicall... (by helios)
April 2019 Pages: 1... 56789... 24
  Archived months: [mar2019] [may2019]

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