General C++ Programming - November 2019 (Page 7)

How to store an input in a string for as many inputs as I want
 
I am writing a code for a student list. The user can choose to input the number of students, and then the program will ask the user to give a name for each stud...
[4 replies] Last: @Ganado That worked! Thank you (by Rinsu02)
TCP returns weird characters
 
This is my code: bool tcpQuery(std::string query, std::string& rtn) { int recv_size = 0, attempts = 0; char rsp = { NULL }; D(std::cout << "TCP qu...
[5 replies] Last: > rsp = NULL; This is a buffer overflow if recv() actually fills the ... (by salem c)
how to combine SFML library with game file
 
I write a game using SFML libraries, however, when I run the game on another PC, it requires this library. I read somewhere that you can pack library files with...
[2 replies] Last: "the right way" is usually to keep the dll and program distinct so yo... (by jonnin)
SIMPLE CONSOLE GAME - PROBLEM STUCK NEED HELP
 
Hey guys, I am very new to C++. I created this console game sort of like Hangman type with little to no reference/help at all. But I have now been stuck for an...
[2 replies] Last: You need a inner loop where you compare the letters with the guess. Th... (by coder777)
Unicode for C++23
 
Rob and Jason are joined by JeanHeyd Meneide. They first discuss an ISO paper about the pros and cons of introducing ABI breaking changes into the C++ standard....
[no replies]
by raneie
Computing compound interest question
 
Hi everyone! I have a question about computing compound interest. What I'm trying to do is display all of the years and their total deposit amounts, depending ...
[11 replies] Last: Rascake was the username of one particularly long-lived troll account.... (by mbozzi)
using vectors: how change the last item?
 
how can i change the last item on a vector? VarNames[VarNames.size()-1].Type ="test"; 'VarNames' is a vector. my problem is how can i change the 'Type' memb...
[4 replies] Last: Ganado true and i found 2 problems: 1 - the added value type was wrong... (by Cambalinho)
Best way to write data to log file
 
I have source code of dll library and i want to log data to a file that dll is passing between functions, for example a call: EX1: test.GetAdapter()->Create...
[2 replies] Last: Something like this, perhaps (__VA_OPT__ requires C++20): #include ... (by JLBorges)
[SOLVED] How to create 100 Arrays?
 
Hi guys, I wanna know how to create 100 arrays without creating one by one. Thanks in advance :D
[3 replies] Last: Thanks @jonnin and @JLBorges for help. :D (by eruschneider14)
"Classes" Practice Example
 
I need help trying to complete this practice question. I have listed my main function, my header file named "Triangle" and another .cpp file named "Triangle" as...
[3 replies] Last: Your code works, but please let me suggest some improvements. Since t... (by dhayden)
string
 
how can i convert the x, y, and z string values to integers
[4 replies] Last: Maybe you need to clarify your question, @Waxbee999. #include <iostr... (by lastchance)
Unclear/Confusing C++ Project?
 
New to C++. Taking a course in C++. Project has confusing instructions. "A teacher wants to list all her students’ full names, considering only for the two...
[11 replies] Last: Thanks again everyone. I think I can finish the code myself now. I rea... (by Rinsu02)
by Kory
Line editor class with auto-complete
 
Hi, I am a rather new C++ programmer, although I have been programming in C for many years. I am working on a C++ based open source app that will be used to ...
[2 replies] Last: Thank you for your reply. Yes, please keep me informed. I did find th... (by Kory)
how do i convert the min_max function to the method of the IntArray class?
 
how do i convert the min_max function to the method of the IntArray class? class IntArray {private : int a ; int n; .......... }; void min_max(int n,int ...
[8 replies] Last: That's not how to call a class member function. Which is very strange... (by Repeater)
Need help for code
 
My output is not showing the correct final scores. double calculateScore(Performer *p, int n){ int Lowest; int Highest; for(int i = 0; i<n;i++...
[3 replies] Last: Garbage in, garbage out. Are you sure that the scores for John Lee are... (by dhayden)
using '?' conditional with for loop
 
see these line: for (unsigned int index=blnFunction? 2 : 1 , varcount=1; index< blnFunction? ... i don't get any compiler errors, but when i execute it, the e...
[7 replies] Last: true.... thanks (by Cambalinho)
how can i overloading the string operator outside a class\enum? (1,2)
 
see these enum: enum TokenType { ID=0, KeyWord=1, Operator=2, Expression=3, String=4, Number=5, ...
[21 replies] Last: thank you so much for correct me... thank you (by Cambalinho)
by LHHH25
Need Help
 
I need some help/advice on how to properly execute this program: Input/Output 1- Create an input file with several numbers. 2- Read the numbers from ...
[4 replies] Last: Please DON'T post multiple threads for the same question. (by MikeyBoy)
Reading Input Files
 
I am currently working on a homework assignment where I have to create a program that will read the numbers off of a file representing a hotel's occupancy. Depe...
[1 reply] : Something like this: numOcc = 0; floorNum = 1; numRooms = 0; floorO... (by JLBorges)
file storage
 
can someone confirm I did my assignment correctly and if need be let me know what i can improve on update on checking file only last number appears the goal ...
[3 replies] Last: thanks so much now i realize that I essentially was writing and re wri... (by HunterIsgonnawin)
November 2019 Pages: 1... 5678
  Archived months: [oct2019] [dec2019]

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