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...
[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...
[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?
[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...
[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...
[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 ...
[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...
[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?
[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. ...
[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...
[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...
[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 ...
[2 replies] Last: You need to supply a uniform random number generator as third argument... (by Thomas1965)
by F95
Delete Post
 
Please Delete
[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...
[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...
[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 : "; ...
[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...
[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); // ? } ...
[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 ...
[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...
[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.