Beginners - April 2017 (Page 14)

How do I return an object from a friend function with 2 members?
 
Hello, I have been tasked to modify a complex number calculator. I face an issue where I am not sure of how to return an object from a friend function that wi...
[2 replies] Last: Hello, Thanks for your corrections. Here is what I came up with in t... (by Shishykish)
2-d array not outputting right letter
 
Hello. I'm working on a project where I basically have to create a seating chart reservation system. I don't understand when I use the reserve seat function why...
[4 replies] Last: Hello bubba, Your are welcome. Any time. Andy (by Handy Andy)
Char String Arrays
 
I have to write a program that has a string stored as "Vacation is near" in an array named message. I have to use a function that accepts the message in a param...
[2 replies] Last: Hello TyDaddyFlex, Unless you are stuck using the old C-style char ar... (by Handy Andy)
Return DIRECTLY to main?
 
Hello there, i have a code with many many functions, at an given moment, i need it to DIRECTLY go back to the main function, to do nothing more between command ...
[4 replies] Last: +gunnerfunner Thanks a lot for that indentifier, it will be usefull ... (by CosminPerRam)
by aioy
Help with making header file in code::blocks
 
Write your question here. #include <iostream> using namespace std; int no(int x, int y) { return x + y; } I'm trying to make a header f...
[1 reply] : I dont know what a full path is It depends on the file system. The ea... (by coder777)
Function Loop Issue
 
Edit: Solved.
[2 replies] Last: Thank you! This was the final part of a larger project on functions ... (by zelotic)
by Boanc
How to stop a sprite in SFML ?
 
Hey, I have a question, how to stop a sprite when it reaches the end of the window in SFML 2.4.2 (I use CodeBlocks ) ? PS : Sorry for my bad english.
[8 replies] Last: Thank you, it worked ! (by Boanc)
initializing constant arrays
 
I have made some code to initialize a set of arrays for lookup tables that looks something like this. double t = {. . .} double r = {. . .} ...
[2 replies] Last: Something like this, perhaps: header: constexpr std::size_t NROWS = ... (by JLBorges)
Cannot Parse Large CSV Files
 
I found this snippet online and have been using it for years. It converts CSV files to string arrays. It works fine for "small" csv files, but will not conver...
[3 replies] Last: I recompiled the code to the latest g++ compiler. It did the trick! ... (by Taffywaffy)
by Toxiic
Trouble with while loop in for loop
 
This function is to verify that the user input is the same as one of the array strings, but it keeps giving the "Not valid input" since it says its not the same...
[9 replies] Last: https://www.tutorialspoint.com/c_standard_library/c_function_strcmp.ht... (by gunnerfunner)
Help With Odd/Even Numbers Within Array
 
Hello, in step 9 of my code, I need to print all the even numbers within the array. I try to divide by two to differentiate my even numbers from my odd. If you ...
[1 reply] : I try to divide by two to differentiate my even numbers from my odd ... (by chicofeo)
Is c++ primer fifth edition still relevant?
 
I'd like to learn c++ and I've seen a lot of recommendations for this book. However, I noticed that it's written for c++11, my question is, is this book still h...
[9 replies] Last: For C++11 and C++14 the examples and a few issues are outdated and Ef... (by TheIdeasMan)
by wolfv
vector function to assign value to an element?
 
I am looking for vector function that assigns a value to an element, and if the vector is too short, the vector is extended to the element's position. I did no...
[3 replies] Last: Thanks Peter87. Here is my assignElement() function in action: #inclu... (by wolfv)
Problem with Program
 
With a lower limit of 0, upper limit of 2, I was told that there is a problem with my program. I was told "This program contains an error, and as result is not ...
[3 replies] Last: Oh, my bad. I thought that the X values weren't right and I was trying... (by dhayden)
can i use braced list to assign std::array ?
 
i read in c++ primer that : Unlike built-in arrays, the library array type does allow assignment. The left-and right-hand operands must have the same type...
[3 replies] Last: but why did he say that it won't compile? I don't know. The uniform... (by mbozzi)
setw() alignment, help urgent please
 
I've been trying to align a mini receipt I made for purchasing a book but am having trouble making it line up when I enter in details. Can you help me figure ou...
[2 replies] Last: the only way to do this is by adjusting the setw(). try changing the ... (by msajjid)
Battle !!!
 
Hi! Here is my code of Tank Battle when you press 1 the first tank should attack when you press 2 the second tank should attack but when I press 1 and the...
[4 replies] Last: Yes, already tried that. Works as it should Thanks :D (by kizhvac kampazitr)
access pointer to array in struct
 
Hello, first, thanks to the website and the community, u helped me a lot :-) my problem: I want to use 1 array for some issues: save memory. I have to run -1 ...
[3 replies] Last: SOLVED.. i worked on this 3 days... lol :-) here is my code #inclu... (by Alpine1989)
help me please ,how to do these tasks?
 
Note:​ 2D array can be used for matrix operation Task 1: You are required to write a program to find the transpose of a matrix. The array can be of any s...
[1 reply] : 1) https://www.google.com/search?q=transpose+of+a+matrix.&ie=utf-8&oe=... (by newbieg)
by cpp82
OpenMP Seg Fault
 
I have a program which finds similar strings from a database consists of million strings of same length m. The input to my program is a string of length n (>>> ...
[1 reply] : Hi, cpp82. Your problem (a lot of strings which can be made only by 4 ... (by Enoizat)
April 2017 Pages: 1... 1213141516... 34
  Archived months: [mar2017] [may2017]

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