Beginners - May 2021 (Page 3)

by scaar
Copy an array of char into a multidimensional array of char
 
I have a set of hard coded arrays of char and I want to use them in order to fill a multidimensional array of char. Unfortunately I cannot use std::string . I...
[11 replies] Last: Yes, this is an exercise and that's why I cannot use strings and I hav... (by scaar)
by saam
get next time
 
I have tried to move the next time frame by Bot (automat) I have implemented the getNextTime on Orderbook class but I dont understand why it doesnt goes to next...
[2 replies] Last: @seeplus thanks. How to move to the next time frame automat ? it doesn... (by saam)
How to populate a string vector randomly
 
Hello, I have trouble making my function that populate a string vector with a size of 10 and fill it with 4 different stings randomly and those strings can be...
[4 replies] Last: Thanks, Andy the way you did it gave me the idea of a very caveman bru... (by Growthra)
by saam
auto c++
 
auto is not allowed here in C++11, C++17. I upgraded C++ language but I still get auto is not allowed here. How do I improve my code? void OrderBook::wi...
[11 replies] Last: @seeplus thanks. (by saam)
by sam1x1
reversing letters of words
 
i am required to reverse the order of the letters of words in the string but the position of punctuation and the words must stay the same. eg. The dog is big. ...
[10 replies] Last: #include <iostream> using namespace std; int main(){ string s= "The... (by anup30)
by siid14
Pointers and C-string
 
I'm doing the following assignment : Write a function which accepts a pointer to a C-string as its argument. It should return the number of words in the C- ...
[11 replies] Last: Yes, what auto generates is version dependent. Apart from that it is a... (by coder777)
by siid14
Overloading and Private Function errors
 
Been working on this problem about overloading function and private function but I got a couple of errors that I trying to solve but it's not successful until n...
[1 reply] : take rectangle:: off initname .. you don't need it there, that may be ... (by jonnin)
by maddi
Modify data in file
 
Hello! I'm trying to make simple bank database, witch is based of structure. I'm having problem with function for changing balance of specific account. Program...
[1 reply] : On line 23 you call seekg(), which moves the stream's read file poin... (by helios)
dynamic array that stores a list of integers
 
I have to write a program that asks a user to enter the size of a dynamic array that stores a list of integers then create the dynamic array and a loop that all...
[3 replies] Last: Hello Anonomys, Your instructions feel to be a bit lacking in informa... (by Handy Andy)
cancel input operation without terminating console
 
Can anyone please give me some hint on how can I terminate an input session in a console app without terminating console/closing app? Consider this scenario at ...
[10 replies] Last: I should skip on adding to this console app and better to switch to a... (by seeplus)
Writing from existing files to a single new output file
 
I want to write a program that reads from three different existing files and writes their contents into a single new output file, making sure to preserve the ap...
[9 replies] Last: As C++ code: #include <fstream> #include <vector> #include <iostrea... (by seeplus)
by min01
POINTERS
 
Hello again everyone! I am confused by the instructions given. Can someone help and teach how to do it? I have no experience in programming I hope you can help ...
[18 replies] Last: #include <stdio.h> int main () { int x = 512; int y = 1024; i... (by againtry)
How to return string from a function and store it in a vector
 
Whenever I try to return the value of string encode() function I get nothing. Can you please help me out and tell me what's wrong with my code? I want to store ...
[1 reply] : Do not start a new thread to continue discussion. That is "double-post... (by keskiverto)
by emcp
linker not finding reference, unless inline?
 
Hi All, I had an example code snippet which I construct a work stealable queue .. all was fine when working on it in my MacOS environment.. now I want to sta...
[4 replies] Last: I got the code now to compile after re-reading a suggestion from a ran... (by emcp)
C++ how to return string from a function and store it in a vector
 
Help me out please!!! I want to return string with this function, but whenever I try to it just doesn't return anything. I want to store the output of this funt...
[2 replies] Last: First, code tags make posted code easier to read. See https://www.cplu... (by keskiverto)
by saam
Binary-search
 
How do i sort it by Binary search? void OrderBook::insertOrder(OrderBookEntry& order) { orders.push_back(order); std::sort(orders.begin(), or...
[1 reply] : It sounds like orders is already sorted when you call insertOrder(). ... (by dhayden)
Implement the split() function to return a vector of strings
 
implement the function split() so that it returns a vector of the strings in target that are separated by the string delimiter. For example, split("do,re,me,fa...
[3 replies] Last: Perhaps something like: #include <iostream> #include <vector> #incl... (by seeplus)
by abuh
please help me
 
Write a method to implement the bubble sort on singly linked list ? #include<iostream> #include<cassert> using namespace std; template <class type> ...
[2 replies] Last: Perhaps: #include <iostream> #include <cassert> #include <initializ... (by seeplus)
Creating a TCP Server for real time chatting app
 
Hello! I am trying to add a project in my portfolio, and as such, it is critical I actually understand how it works. I am trying to create an program, such t...
[1 reply] : If you haven't read http://beej.us/guide/bgnet/ yet, then start there.... (by salem c)
Asking User If they want to run program again
 
I have this calculator program and i need to ask the user if they want to run it again, right now when i say no it will stop, but when i say yes it just ends, h...
[3 replies] Last: bool run_again() { string prompt{"Do you want to run again (yes o... (by againtry)
May 2021 Pages: 12345... 10
  Archived months: [apr2021] [jun2021]

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