Beginners - February 2017 (Page 12)

by ecka1
fille help
 
I am trying to crete a file of telephone subscribers, where you enter name ,lastname and the phone number of the subscriber (via testatura) and then print the...
[no replies]
by ecka1
fille
 
I am trying to crete a file of telephone subscribers, where you enter name ,lastname and the phone number of the subscriber (via testatura) and then print the...
[2 replies] Last: this is the enter, but what about the table:? please correct me #inc... (by ecka1)
I need some help with a program function
 
I'm working on a program that converts fahrenheit to celsius temperatures. I have the program written but I need to write a function to go with the program. T...
[2 replies] Last: Now where do I plug that into the program in order for it to compile c... (by Aaron89)
Internal linkage and static variable
 
Hi guys! I just learn about static and extern keywords. Everything make a sense for me BUT there is one thing which doesn't. Most of articles, forums etc wrote...
[7 replies] Last: http://www.cplusplus.com/forum/beginner/208987/ (by closed account 48T7M4Gy)
How to change the contents of a std string ?
 
If I have a std:string that has say a number like "7877673421" how do I go about turning this into "787-767-3421" ?
[10 replies] Last: Probably would have been quicker to look up regex, but never mind: #... (by lastchance)
My function isn't working properly.
 
This isn't displaying the string. I'm not sure if the function is even correct. #include <iostream> #include <cstring> #include <string> using namespa...
[3 replies] Last: I'm just not sure how to change the string. #include <iostream> #... (by lastchance)
how to multiply with a dereference?
 
Write your question here. *p is a deference. **p is a pointer. So if I want to multiply with a *p, how can I code? Just a strange thought popping into m...
[5 replies] Last: Thank you! very helpful. (by landlord2017)
How to trim a string with excess white spaces at the ends?
 
If I have a string with white spaces at the beginning and the end how do I get rid of them ? If I have something like #include <iostream> #include <string> ...
[8 replies] Last: Another option: #include <iostream> #include <string> #include <cctyp... (by Thomas1965)
inheritance & polymorphism
 
I have an exercise where the following class hierarchy must be adhered to:- Base class - Shape then 2 derived classes 2d shape 3d shape then we have circle, s...
[17 replies] Last: It's possibly flogging a dead horse but a few major problems I had wit... (by closed account 48T7M4Gy)
Determining how many minutes have passed using two strings with two different set of time ?
 
Write your question here. Let's say I have two std::string that have two different times like so 12:05:02 12:20:02 in the HH:MM:SS format how can I go ab...
[3 replies] Last: int seconds_since_midnight( std::string t ) // format is hh:mm:ss (24... (by JLBorges)
Minimum moves to rearrange one string into another
 
I want to rearrange string a into string b in the minimum amount of moves. Both strings are of the same size. Groups of letters can be moved For example: Inpu...
[13 replies] Last: Thanks for the help everryone (by Code Apperentice)
HELP: determineType with cin
 
I am new to c ++ and what I am trying to achieve is cin a value and make the overloaded functions determine the type of value . Here is what I have so far. I ju...
[4 replies] Last: Something like this, perhaps: #include <iostream> #include <string> ... (by JLBorges)
Sports stats
 
Greetings all, I am trying to create a program that shows sports stats. I have several resources at my disposal and was wondering what would be the best way to...
[2 replies] Last: Alright I decided to use a SQLITE database. I already have the databas... (by bigler1910)
[THIS IS HW] - Printing things twice, only need once
 
As noted above, this is HW but I'm hoping someone could help me find out what I'm doing wrong? My entire code is posted below but my problem is that I seem t...
[2 replies] Last: Thank you!! (by mongoliancowboy)
by F95
Help needed writing a c++ program that handles passenger reservations information.
 
Need to use a class with an array of 10 structures in the private portion of the class and instances of this array of structures are to be created in the public...
[2 replies] Last: I'm not allowed to use any quit or exit commands. This is the code I ... (by F95)
Why won't my validation loop?
 
So I am making this program that checks user input for a Customer ID #. Formats that should be allowed are LLLNNNN so L = Letter and N = Number. Examples: ABC12...
[2 replies] Last: Thomas1965, Yup. I totally overlooked the relational operators. Silly... (by MisterTams)
by nomat
Logic Error
 
Guys I have a logic error in my code and I cant seem to spot it!this program should calculate the circumference of a circle or the perimeter of a rectangle by u...
[2 replies] Last: Wow! Thanks Cire it actually works perfectly now! Amazing how one line... (by nomat)
HELP: My 2d array is reporting incorrect inputs. I am not sure why
 
I am having a problem where if I input 1, 2, 3, 4 for each game and i am receiving a different output from the array (scoreSheet ). I would get . . 1 1 2 3 1 2...
[8 replies] Last: Post your current code. and when i change to the same for statement ... (by jlb)
remove duplicates from an array
 
I'd like to make a void function that merge two arrays and delete duplicates then return the size of the array. below is to merge two arrays. n1+n2 are less ...
[2 replies] Last: In your code, you aren't copying the first n1 items of arr2. I always... (by dhayden)
fstream: Saving parts of a line into different strings without the white spaces included ?
 
Lets say I have a text file with a bunch of names on it. The position where each element start remains constant throughout the lines(example, last name starts...
[3 replies] Last: You don't need to substring the line into first, last etc names in thi... (by gunnerfunner)
February 2017 Pages: 1... 1011121314... 37
  Archived months: [jan2017] [mar2017]

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