Beginners - December 2018 (Page 12)

by obeeey
How to put string into a struct?
 
Hi :) I have a problem with my code - the point of it is to save separately individiual parts of a .html file into struct. For example, this is .html file: ...
[1 reply] : it looks like you read all of the file looking for head, and then read... (by jonnin)
Name lookup of 'i' changed for ISO
 
I need to program an action, that would find the lowest common multiple (LCM) of 18 (j) and 7 (i), but it it shows an error. What is wrong here? #include ...
[4 replies] Last: Yes, it works now. Thank you guys so much! (by MrGoodCookie)
by roskee
unknown error while defining a constructor
 
This week i was working on a console based snake game. i created graphics.h,snake.h and mouse.h classes for my project. in the snake class i had a constructor w...
[4 replies] Last: #ifndef GRAPHICS_H #define GRAPHICS_H #include <iostream> #include "... (by roskee)
data type to use for dynamically changing number of items
 
I will be parsing out lists of words from string, and placing those words into a data structure that is yet to be determined, but can be resized with each new p...
[4 replies] Last: excellent, thanks. (by zydeholic)
by DellXT
How to Draw this in console window using C++
 
How to Draw this in console window using C++ ╔════════════════════════════════════╗...
[3 replies] Last: Thanks! (by DellXT)
Trouble getting lambda to work correctly
 
How might this be fixed to get the lambda to work? Trying to evaluate if the string rating contains characters other than '*' Thanks std::string rating = "*...
[4 replies] Last: Peter87, thank you a lot. I really asked a stupid question and wrote a... (by Enoizat)
need to convert single character to string for function call
 
I have a function that loops through an array of strings, trying to find a match. I read that I'm supposed to divide sizeof(array) by 4 to get the actual array...
[4 replies] Last: Thanks for all the effort you took in analyzing this. I just wanted t... (by zydeholic)
by AM111
unable to ru
 
When I run the code, the program tell me that it is unable to open the three files. Can anyone help me please? #include <iostream> #include <fstream> #...
[2 replies] Last: thanks! I had the files on a contentfolder . It works now (by AM111)
Number guessing game
 
This program's supposed to randomly generate 6 numbers for the user to guess and calculates the prize depending on how many numbers they guessed correctly? The ...
[10 replies] Last: Makes sense. I'm curious, but what was it before the edit? (by Satan)
by AM111
C++ error
 
When I run my code, It appears an error in this part saying: "error: expected ';' before 'newCais'" Can anyone help me on this? Thank you vector<cais> ...
[4 replies] Last: Thank you very much!!! It works now! (by AM111)
Sort Specific Column of 2D array
 
Greetings plusplussers. I'm strugging with creating a user defined function. It has three purposes. 1: Receive user input to select a column from a 3x5 array (a...
[1 reply] : Currently you sort only the first row. Since mincol is a copy you on... (by coder777)
Help with selection
 
Hello guys, I tried to make a kind of a menu but I don't know how to make the selection I have alot on options to use I know but I wanna do like a toggl...
[6 replies] Last: Thanks @kkeskiverto, @FurryGuy, @Handy Andy, (by OshriMakk)
help getting program to run until stop is entered and memory access errors
 
hello I'm am needing help with some code I wrote that reads a text file of 1000 most popular female names and sorts them for the user to enter a name and output...
[3 replies] Last: The first element in the array is the one at offset zero from the begi... (by mbozzi)
Recursive Definition Clarification
 
"Consider the following recursive definition, where n is a positive integer. F(1) = 3 F(n) = F(n - 1) + 1 if n > 1 The value of F(3) is _____________...
[1 reply] : https://lmgtfy.com/ https://stackoverflow.com/help/how-to-ask (by TheIdeasMan)
Find Max of 2D Array: Finding value and index of largest element
 
I have a problem in my Intro to C++ study guide for my final that asks for a user-defined function to find the largest value and its index in a 2D int array. I'...
[9 replies] Last: No, I'm saying return the "index" to the calling function and do any p... (by jlb)
clock - very incomplete, but trying to understand classes
 
Im working on this clock project and im trying to set it up so it checks if hr is greater than 12 for am/pm. I keep getting the error 'class Time' has no member...
[5 replies] Last: What I riginally wrote worked better in the short run but I changed be... (by diggty66)
gettin the average
 
Hi, i have a file with these following numbers and i want to take it as an array and take the average, i could write this much but im getting wrong average: 34...
[5 replies] Last: oh i got it i just needed count++ after the loop, thanx guys (by aliklz92)
Do programmers write reports/essays?
 
Hello. My writing skills in school are lacking, and I was wondering whether they are important for programmers (Writing reports on how his/her code works, etc)
[1 reply] : I have hired good communicators who are adequate programmers, ahead of... (by Repeater)
how can I simplify this chess square program in a more c++ way?
 
ok so in this simple program I'm checking the content of input against odd and even strings from sqname . how can I simplify my code to check for odd or even el...
[2 replies] Last: ya, I was thinking that could be another way after c++ 11. I need to g... (by doulos24)
Convert integer to roman numeral function
 
I need to create a function to convert an integer to a roman numeral, this is what I have so far. int main() { void Roman(int nu,int m, ...
[1 reply] : Line 3: You can't nest one function (Roman) inside another (main). L... (by AbstractionAnon)
December 2018 Pages: 1... 1011121314... 22
  Archived months: [nov2018] [jan2019]

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