Beginners - March 2017 (Page 2)

Locating a Name in a Data File
Hi, Basically, this code is suppose to allow the user to search through a list of names stored in a file for a particular one. The names in the file will be st...
Mar 30, 2017 at 5:00pm
[2 replies] Last: jlb’s code is neater and I definitely suggest you to stick to it. An... (by Enoizat)
My if function isn't correctly working
if(choice == 'e' || 'E') { encryption(in_stream, out_stream); //function to encrypt } else { decryption(in_stream, out_stream); //function to decrypt...
Mar 30, 2017 at 4:53pm
[8 replies] Last: Thankyou. It's much appreciated! (by MikeyBoy)
Arguments and functions
do I have to pass an argument to a function in order to get back something from that function?
Mar 30, 2017 at 4:04pm
[1 reply] : Not necessarily ... #include <iostream> int noArgs() { return 4... (by gunnerfunner)
Hello how to declare the quantity in the problem?
Write your question here. Here's the sample run of the problem: LUNCH ORDER =========================== ORDER OF HAMBURGERS : 3 ORDER OF FRENCH FRIES : 0 ORDER...
Mar 30, 2017 at 3:29pm
[5 replies] Last: Use double as the default floating point type. It is not just about... (by JLBorges)
How Do I Call Display Through Iterate?
Hi how do I call display through Iterate in PartsCatalog? I know I overloaded it in CarPart and AirPlanePart but how do I call it in PartsCatatlog? I tried load...
Mar 30, 2017 at 1:07pm
[3 replies] Last: According to the comments you want this: class Part { public: Part... (by coder777)
help with function
the program below is suppose to ask the user how many random numbers to print , and then print said amount of random numbers, using functions, but it seems to ...
Mar 30, 2017 at 7:30am
[3 replies] Last: cout << tallyArray << "\n"; You print only the count of the number... (by Thomas1965)
Trouble reading a file into program
My program is supposed to prompt the user to enter the name of a file (which for my case is simply data.txt). If it works then it works. But if the file name is...
Mar 30, 2017 at 3:26am
[1 reply] : http://www.cplusplus.com/doc/tutorial/files/ Have a look at the sampl... (by closed account 48T7M4Gy)
by xx123
UML class diagram c++
So I am a little confused on how to diagram and connect everything in UML. is it through the header file or the main cpp file?
Mar 30, 2017 at 3:13am
[1 reply] : The UML diagram generally shows the relationships between classes so t... (by closed account 48T7M4Gy)
Print 5 numbers per line
This program checks if a number is prime and if it isn't prime outputs the divisors Lines 33-48 outputs the divisors and I want them to come out 5 per line. ...
Mar 30, 2017 at 1:54am
[2 replies] Last: Thanks jonnin, I ended up formatting it like this and it works. whil... (by cuttinace)
by kinley
Converting a C++ project to a dll
Hi, I have 2 massive (several header and class files) C++ projects. Lets call them project A and B. The way it works is that project A gets data from the...
Mar 29, 2017 at 10:49pm
[3 replies] Last: you include a header file with the functions that you exported in the ... (by jonnin)
Shuffling vectors
Python has a cool function that lets you shuffle lists, C++ looks like it has a similar function but whenever i use it, the output is always the in the same shu...
Mar 29, 2017 at 9:38pm
[11 replies] Last: thank you all, this has given me something to think about. (by mrphilipp7)
Issues with std::shuffle compiling
I'm unable to compile my code with std::shuffle accepting my random number as the third argument. I get the following error: Type 'int' cannot be used prior to ...
Mar 29, 2017 at 9:07pm
[2 replies] Last: You need to supply a uniform random number generator as third argument... (by Thomas1965)
by F95
Delete Post
Please Delete
Mar 29, 2017 at 8:44pm
[5 replies] Last: . (by F95)
by F95
Exception thrown in linked list
When I compile and run my code, everything works fine if the first input is 'E'. If my first input is 'D', the compiler closes and I get an exception thrown (re...
Mar 29, 2017 at 8:42pm
[2 replies] Last: Thanks. Everything works now. I also figured out why the exception was... (by F95)
Need Help With My Loops
I cant for the life of me get my loops to work. One part of the loop will be fine, then another wont be fine, and no matter how many times I try to fix it, some...
Mar 29, 2017 at 8:39pm
[9 replies] Last: Giving such a short piece of code that doesn't even compile means push... (by Enoizat)
How to display contents of Char array line by line
Hie. Please can i know how i can display the words typed in by the user into a char array. Here is my code. cout << "How many words should i look for : "; ...
Mar 29, 2017 at 8:12pm
[5 replies] Last: I havn't created the boolean function for searching for the words yet.... (by closed account NADG3TCk)
Some help with a queue
Hi there! I have a small problem with a queue. N(integer number) individuals wait in a queue at a theatre. The theatre is closed between 9 and 10. Each indivi...
Mar 29, 2017 at 8:10pm
[1 reply] : This may help: http://www.cplusplus.com/reference/queue/queue/ (by kingkush)
How to exit outside of a function ?
How to exit outside of a function ? Does exit(0) do that ? void check_enpoint(int row, int col){ if(board == position::wall){ exit(0); // ? } ...
Mar 29, 2017 at 7:48pm
[4 replies] Last: So exit() exits completely out of the program, is there any better w... (by mbozzi)
by rantiv
Vector BATTLES!
This program takes in restaurants names and stores them in a vector to ultimately decide which one to eat at. My function cut is suppose to Prompt the user for ...
Mar 29, 2017 at 7:38pm
[6 replies] Last: Thank you both for your help (by rantiv)
Need some help !
I am suppose to find the radius using the formula for the distance of two points. the formula is sqrt(x2-x1)^2 + (y2-y1)^2 the function accepts 4 float numbe...
Mar 29, 2017 at 7:15pm
[2 replies] Last: Thank You ! (by scooby93)
March 2017 Pages: 1234... 36
  Archived months: [feb2017] [apr2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.