Beginners - March 2017 (Page 3)

Expanding part of a code.
 
The following code is. char Encrypt_Monograph(char C, int Key_Uni) { return Alphabet[(Alphabet.find(tolower(C))+Key_Uni)%26]; } I need to expan...
[5 replies] Last: jonnin lol I'm not being paid or anything. This is just an assignment ... (by closed account G2UR4iN6)
by Faggio
string and stream input
 
Is it possible to use stream input(for example cin.get, cin.getline...)with a string? I see only that these are used with character arrays; for example: i...
[2 replies] Last: Yes you can. string str; // Read one word. // http://www.cplusplus... (by Peter87)
Undefined reference to deconstructor
 
I am getting an error when compiling the a code with templated class. main.o: In function 'main': /home/XXX/XXX/XXX/main.cpp:37: undefined reference to...
[6 replies] Last: MikeyBoy - you've asked the most fundamental question that should have... (by gunnerfunner)
Help With Deleting Duplicates In Arrays
 
Well I got my code to delete duplicates when they are right next to each other (ex. 10,11,11,12,13,14 | prints out 10,11,12,13,14), but doesnt find the duplicat...
[8 replies] Last: #include <iostream> int main() { const int SIZE = 20 ; // *** co... (by JLBorges)
by mmgh
reference change when push_back
 
Hello, I have a problem to push_back new elements to a vector. When I push a new element, all the elements I added before become the same as the new elemen...
[9 replies] Last: std::move(...) has no effect in this case. It is a kind of cast that e... (by coder777)
Containment and memory management in classes
 
I have an assigment I am supposed to do and I am completely lost my teacher went very fast through this section and I am still very confused. What I would like ...
[2 replies] Last: explain what containment and memory management in classes is exactly... (by gunnerfunner)
Please help me right now!! please :(
 
Please help me to answer this questions because i need to pass it on monday thankyou. These are the problems Repetition Control 1. Develop a program th...
[11 replies] Last: I recommend taking some lessons on the Web like from code academy or o... (by benhart)
Putting std::string in union returns error
 
Hello, So whenever I put std::string in a union it returns the following error: the default constructor of "storeItem" cannot be referenced -- it is a deleted ...
[2 replies] Last: Thanks, using struct fixed it. (by Alaanor)
Functions
 
I'm having trouble figuring out function parameters for my program. This is my code so far. How can I fix my program so that it will work properly. Write...
[1 reply] : First of all the prototypes needs to match the implementation. See: ... (by coder777)
Caesar Cipher 99% done
 
I am working on a caesar cipher encrypter and decrypter program. I got the encrypter part to work. I just need help with the decryption part. /* Quick explana...
[1 reply] : Can you supply code with your solution? it makes easier to figure it o... (by xxvms)
Sockets - Server spamming (null)
 
The goal of this is for the client to connect send a message the server receive the message print the message in server console and then send the same message b...
[3 replies] Last: The read functions in both Server(line 88)/Client(line 67) store the d... (by coder777)
Re-entered value not returning to function
 
Hi I'm VERY new to C++ and am struggling to figure out what's wrong with my code. I'm doing a project to calculate the air density of a material which contain s...
[1 reply] : The problem with the check_inputs_... functions is that you pass by va... (by coder777)
Weird compiler error when passing 2D array to function
 
I'm getting an odd compiler error that I can't make heads or tails of. I've narrowed down that it's related to me passing a 2D array as a function argument. Th...
[1 reply] : NOTE: Not all of my program is here, I've removed function definition... (by TheIdeasMan)
creating a test with multiple choices?
 
first off, im a complete noob, i only have about 10 hours of actual programming so bear with me. im trying to write a test that has multiple choice answers. ...
[4 replies] Last: A key idea here is that the below line is probably not what you want. ... (by mastakhan)
***Appending - Instead of Over-Writing***
 
Team, I would like to put a header onto a csv - then append to it consistently until my program ends - ie - NOT over-writing anything. How would I do this ...
[1 reply] : // open for output in append mode (create a new file only if the file... (by JLBorges)
Help debugging code
 
my code is: #include "mapwalk.h" void mapWalk( string input, string output ) { int numbers ; istream in(input); ostream out(output); string jun...
[3 replies] Last: ok, i thought i might as well get you started with the first five line... (by gunnerfunner)
***How Do I Return To The Beginning Of My Program?***
 
I have a program, many pieces. Well, many for me as a newbie. -It prompts the user for a choice. -The User puts in the choice. -The program runs and compi...
[1 reply] : Put your code in a loop. int main() { bool quit = false; do { ... (by mbozzi)
max and min
 
the program below generates random numbers, tallys them, adds them, and displays min and max as well, im having one slight problem, if i put for it to only prin...
[5 replies] Last: gunnerfunner, unfortunately we have not yet covered the use of std:: c... (by persades)
Simple Question
 
I'm getting an error saying I'm missing { before the left brace. I can't find where that is however. Wherever I put it, I get another error. // Can ...
[2 replies] Last: #include <iostream> //#include <iomanip> // <-- don't need this ... y... (by closed account 48T7M4Gy)
From Binary to Octal Conversion Help
 
Hi, nice to meet you all. I'm having some trouble with my homework in my C++ coding class, and needed some help, even a push in the right direction would be app...
[7 replies] Last: Regarding the use of '\n' and endl there are good reasons why endl is ... (by closed account 48T7M4Gy)
March 2017 Pages: 12345... 36
  Archived months: [feb2017] [apr2017]

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