Beginners - November 2013 (Page 59)

Random Numbers on an Output Stream
 
I'm trying to get 100 random numbers onto an output file and I can't figure out why I'm only getting 1 number in the output.txt (the last one) #include <c...
[3 replies] Last: Cool, thanks for the help! It's been racking my brain for days now. (by firstlast)
Writing function to return min/max of given test arrays
 
Hi all, I'm new to c++ and was given an assignment to make a function that will find the max and min of given test arrays. I was given a header file to downloa...
[1 reply] : Firstly all your arrays are empty arrays. You need to fill in values p... (by abhishekm71)
Xcode: Unusual Compiling Problem
 
I cannot figure out why Xcode won't compile my code. It doesn't signify any normal syntax errors in main.cpp, but on the sidebar it displays what appears to be ...
[1 reply] : On line 3 try void chopin(int x, int& y, int z, int& q) Or modify li... (by ats15)
by Susan
Pointers
 
Hi! Can anyone please explain the difference between int* p and int** p?
[5 replies] Last: Does it mean if i make a pointer p point to an the first element of an... (by Susan)
by Caith
Need help with inheritence (not compiling)
 
I'm trying to do shape inheritance for class, and because it's fairly long (to me at least), I'm looking for assistance to find out why it won't compile. I've b...
[1 reply] : http://www.cplusplus.com/forum/articles/40071/#msg216270 (by ne555)
Need Help ASAP with a Loop
 
Write your question here. // Calculator, by Keegan Mathur // Include the iostream library #include <iostream> //Use the standard namespace using namespac...
[9 replies] Last: Sorry for such a late reply, major computer issues. I got it working n... (by KeegM480)
by ccngai
Problems about array modification
 
Suppose i have a char 2d array and i would like to write a recursive function to modify the array in the following way.And the function base on the new array to...
[1 reply] : Who can help me figure it out? (by ccngai)
Help with arrays
 
Hello all. I need help with a classwork assignment. The original task I have to do is use a single-dimensional array and print a bar chart (using asterisks) for...
[1 reply] : You need a "18-20" as well. The calculation in line 21 is wrong. Need ... (by ShodanHo)
by wolfv
next_permution() compile error
 
The first do-while loop works fine. The second do-while loop adds next_permution() and gets hundreds of compile errors. Can you please tell me what is causing t...
[2 replies] Last: Thanks long double main. operator< is exactly what was missing. The f... (by wolfv)
Help with caesar shift/ endcoding, decoding
 
Is anybody familiar with the caesar shift function? My encoding and decoding are putting out the same information, and I am not sure how to fix it. I am a begin...
[no replies]
Help with Hotel Occupancy Program?
 
Hi I am trying to write a program to determine hotel occupancy. I am STUCK in my loop!!!! What is wrong with this code?! The program should begin by asking f...
[2 replies] Last: for(floor = 1; floor <= numfloors; floor++) { floor++; floor is a... (by xismn)
stringstream
 
any help in : stringstream !!
[2 replies] Last: http://www.cplusplus.com/reference/sstream/stringstream/ What don't... (by AbstractionAnon)
sound
 
am trying to make sound using just c++ without any linker or additional dependencies like sfml , open gl , etc is it possible or do i need additional libraries ...
[2 replies] Last: To do any kind of I/O, you need a library. Even I/O to the console (c... (by Disch)
by dday9
Rand() gets same seed
 
I'm trying to get a random number from 0 - 2, but for some reason I keep getting the number 1 being returned and I'm guessing it's because the seed stays the sa...
[5 replies] Last: @Chervil - Thanks, I'll use the srand (0) and avoid having to include... (by Disch)
Two Dimensional vector assignment issues.
 
Hello! I'm new to C++ and I have an interesting assignment for class that , honestly I have no clue where to start. We are working with two dimensional vectors ...
[no replies]
by Garion
Nested While Loop
 
I was trying to figure out how to make a nested while loop that ends when a user inputs a specific string. I might be jumping the gun here and just need to run ...
[5 replies] Last: I noticed that behavior after I posted, I will have to remember that v... (by Garion)
Function body in header file?
 
Hey, Very new to c++! One of those kids who did Java for years and left scratching his head over the extra complexities that c++ brings. I'm getting the hang ...
[2 replies] Last: Hah! Ah ok, thanks! So this way of defining is almost exclusively fo... (by smittey)
by dday9
if statement not executing properly
 
I'm teaching myself C++ and I've decided to make a game of Rock-Paper-Scissors. I'm at the beginning part where it checks if the user entered in rock, paper, or...
[4 replies] Last: @Mats, yeah I changed the output to lowercase rock, paper, scissors an... (by dday9)
by Garion
Comparing Values
 
I recently decided to try and learn how to make simple programs. I found the tutorials on here and started running through them but I am having problems with t...
[3 replies] Last: That fixed my error on that one. Thanks. This is where it gets hard f... (by Garion)
getline() not working
 
Write your question here. int password::pass_search_in_file(char* name) { char c_line = {0}; int n_line = 0; ifstream filex; filex.o...
[3 replies] Last: try this: #include <iostream> #include <fstream> #include <string> u... (by chipp)
November 2013 Pages: 1... 5758596061... 80
  Archived months: [oct2013] [dec2013]

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