Beginners - February 2019 (Page 9)

Reading in a file (with ints and strings) using getline
 
Hello out there. I am having trouble reading in a file that holds info about cars (year,make,model). I need to create a vector of objects for each element in...
[6 replies] Last: It worked! Thank you for your help fiji. (by Marcos8701)
Arrays with while loop help (homework)
 
Hello, im new to programming and I have an assignment where I can't get passed the while loop set up. I have the coding well enough to enter and store the first...
[4 replies] Last: My comment provided info on how to do the for loop as well. "You may ... (by PiggiesGoSqueal)
Write a program that acts as a self-checkout register at a store and lets the user buy 2 items
 
The program will prompt the user and read in: - the name of item 1. The name can be multiple words with space in between. - the price of item 1 and number of it...
[7 replies] Last: Yes, if you applied what you learn in class. (by chicofeo)
Statement questions
 
What is a function, class, and etc? Are functions statements? //Why is this possible void blah(/*blah blah blah*/) { //blah blah blah };// This semicolon ...
[4 replies] Last: While this does not directly answer your question, most of these links... (by PiggiesGoSqueal)
by Alb13G
SWITCH PASSWORD PROGRAM
 
I'm having a problem converting the password program to a switch this is the first choice in the program Menu: In your main function, present the user with a nu...
[2 replies] Last: Hello agrennan, In the future in your subject line do not shout, i.e.... (by Handy Andy)
Help needed with an exercise
 
I need some help to understand this exercise: "write a C++ code to replace all the words "dog" with "cat" from the following test: The quick brown fox jumps ove...
[3 replies] Last: Hello freenba2002, Just to help you along: PLEASE ALWAYS USE CODE T... (by Handy Andy)
by Cairus
Function issues using ADT bag
 
according to decode, my insert functions in bag do not exist or do not match, I am also getting an error because the function only has one arguement supposedly?...
[8 replies] Last: I think you must have changed something. But it looks like in order to... (by dutch)
by jmpt
Encription upgrade
 
I need to improve my encription code and I've thought of putting random chars in between a char array (example down below) but I can only replace chars in the a...
[16 replies] Last: Yet more ways to complicate text encription: I need a way to scramb... (by jmpt)
How do I modify my geometric equations to compensate for Cartesian/Computer difference?
 
I know this may seem more like a math question, but I'm asking it here because I know that graphics and math are done a lot with C++, so I figure there must be ...
[14 replies] Last: @dutch Sure, here are the .h and .cpp files for SDL_Helper // SDL_... (by closed account Ezyq4iN6)
First Time Writing a class
 
it is supposed to make a class that takes birthdate and prints the day number in its year like 1/31/2017 is the 31st day and 2/2/1999 is the 33rd day and so on]...
[4 replies] Last: @granado Thank you I forgot to intialize it but why isn't xcode sho... (by Jack Van Stone)
Templates
 
I have never studied Templates until now. ====================================================== Thank you all in advance
[1 reply] : If you're going to show others your code, you should indent it like th... (by dutch)
How to find gmail certificate for libcurl?
 
I'm following this libcurl example here to send an email: https://github.com/curl/curl/blob/master/docs/examples/smtp-tls.c I mostly got it to work, but I...
[1 reply] : Just guessing, but try this: https://www.geotrust.com/resources/root_c... (by dutch)
Array kind of stops (?) at value of 10. help
 
input for the following code: 1 10 1 1 1 1 1 1 1 1 1 10 #include <iostream> using namespace std; int main(){ int T, N, i=0, j=0, A , S ; cout<<"##...
[2 replies] Last: Well, line 4 is illegal and, even if it weren't, there wouldn't be man... (by lastchance)
by Raj12
Related to basic c programming about function return type.
 
Why the sum function returns proper value even after remove/comment the return statement in sum function definition.? why it is not throwing any errors>>>???...
[14 replies] Last: It's not really a problem if we just make sure to enable warnings. C... (by Ganado)
Edit distance
 
Question link- https://www.spoj.com/problems/EDIST/ Question description- Minimum no of operations to convert one string to another. Operations being repla...
[12 replies] Last: The issue was using getline instead of cin (by closed account 1vf9z8AR)
string palindrome
 
Hi, I am having a problem with the following palindrome code, only the first input seems to work fine, but when I repeat the calculation without exiting t...
[7 replies] Last: Hmmm. I thought it was some kind of glitch because I hadn't included c... (by Grime)
Double Array with 2 row and 2 column varibles (1,2)
 
Dear Friends I want to make a double array in which I want two variables for row (say I and i) and two variables for column (say J and j) changing one after ...
[23 replies] Last: It's a nonlinear system, so yes, it's possible to have multiple soluti... (by lastchance)
Help with repeating code
 
Thank you for the help!
[1 reply] : your mixing of >> and .get() has the same problem than here http://www... (by ne555)
Random numbers, math library and mixed mode arithmetic
 
Write a program that will do the following steps: - generate 2 random integer numbers between 1 and 20 inclusive ( 1-20, no 0 values) - calculate the square r...
[7 replies] Last: Heh, https://xkcd.com/221/ No, you cannot pick your own random number... (by Duthomhas)
How to filter
 
İf You Run program below you will get result (start result filter from top to bottom) 01 02 03 04 05 + take first row 01 02 03 04 06 - in secon...
[4 replies] Last: İf you run this program const int NMAX = 8 above it will give 56 ro... (by avnitoto)
February 2019 Pages: 1... 7891011... 23
  Archived months: [jan2019] [mar2019]

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