Beginners - November 2012 (Page 46)

Variable being used without being initialised even though it is
 
Hi all, I have just begun learning c++, and am going through some example code with regards to linear search.. When I execute the code below, I get the error "R...
[14 replies] Last: Thanks JLBorges.. (by Teroxgt)
User Input in String Variable
 
How can I store a input from a user in the form of phrase like "Hello How Are" in a string variable. Note: The Spaces should be included in the variable.
[3 replies] Last: Thank You (by Farrukh12)
Creating a class. Header file?
 
I have created a class "Clock". I'm following from an example out of my book, and everything compiles fine except for one thing, the header file at the top. I'...
[3 replies] Last: As well as Stewbond 's code in the Clock.h file, you would have the d... (by TheIdeasMan)
DES problem
 
I have a problem when compile...I am a beginer in c programing...I had to do a DES program encryption and decryption...so it will be more then useful to tell me...
[9 replies] Last: sorry about how the code looks...it is to big that I had to make him ... (by TheIdeasMan)
by knudmt
Implementing Interfaces
 
Hi there, total C++ newb. so I have a header file that is set up like so: namespace whatever{ classA { public: virtual v...
[4 replies] Last: hopefully this will shed some light // the https response ... (by knudmt)
How to I implement an equality operator?
 
I also have a Point class with protected: x and y. How do I implement an equality operator? Kept getting the error: no match for 'operator==' vector<...
[2 replies] Last: bool Point::operator==(Point& RightHandSide) { return (this->x ==... (by Stewbond)
Splitting a function into 3 more functions.
 
I am trying to understand functions, or how to make one that calls another function, and i am trying to use as many functions as possible in this code. I want t...
[16 replies] Last: This concludes this exercise, i have pasted the final code for further... (by inukshuk)
by malt
counting letter occurences with strings
 
I am trying to write a program to take in a string of text from the user, output the number of words in the text, then count the number of occurrences of each l...
[5 replies] Last: You don't have to. You can just check for 'a's and put that into slot ... (by Zhuge)
Have no idea what to do
 
This is a homework assignment and I am almost done but I get one syntax error, here is my code: #include <iostream> #include <cctype> #include <cmath> #i...
[2 replies] Last: Don't try to call main(); from within main(). Use the normal cont... (by Chervil)
by MW130
Some very nooby questions
 
Hello, I am pretty new to c++, have been doing it on and off for 2 months. I had a few questions. I have developed very simple programs, guess my number, etc. I...
[8 replies] Last: http://lazyfoo.net/SDL_tutorials/index.php This is where I got my stu... (by Anders Ekdahl)
Calculation errors?
 
Hello! I am trying to make this quiz about circles to help my younger brother do better in his math, but there are some problems... For the normal difficulty(I ...
[3 replies] Last: A type double can hold about 15 decimal digits. It doesn't make sens... (by Chervil)
Randomizing and Avoiding Overlap 2D Arrays
 
I have an 2D array that contains set values. I want to create two functions to randomize the values and avoid overlapping them. How would I go about it? ...
[6 replies] Last: C++ has the handy functions random_shuffle() and shuffle(), which can ... (by Cubbi)
Please explain my output
 
So I clearly don't understand how arrays are working. #include <iostream> using namespace std; /* Write a program that creates a 3x3 matrix and then pr...
[13 replies] Last: Thank you! (by macleight)
Indexing an Array
 
I have the Array Indexed Variables written out as a second for loop in my program. What I want my code to do is find the max out of ten Arrays and then point to...
[4 replies] Last: Instead of having 'max' store the maximum value, just have it store th... (by Zhuge)
Out of bounds memory block?
 
I've been writing something that will allow me to read an entire file and organize all data into 8 byte binary blocks. I want to be able to manipulate individua...
[13 replies] Last: Yup, that's what it ended up being: an interpretation issue. Loaded th... (by drognisep)
SDL_rect function
 
Hello there, im sitting here doing pong using SDL and I have found myself in a little pickle. I have some variables in my player class that I need to be call...
[no replies]
reference parameters with 2 values
 
i need to write a function named compute that is based on a circle’s radius, compute should compute the area and circumference and saves those values to two r...
[5 replies] Last: Well, for once thing you declare your compute() function to return typ... (by Raezzor)
Loop Help
 
I am currently in my 2nd semester of my CS classes and my teacher only provides help to a select few and does not give an option to help outside of class so I w...
[18 replies] Last: Alright after I turned this in the teacher told me that I was not supp... (by Cromation)
INT_MIN, INT_MAX
 
I am attempting to sort the max and min values of an array. I read about <climits>, but I am unclear how to use INT_MAX and INT_MIN. What is the proper syntax f...
[10 replies] Last: On line 21 max = min = iMaths ; the values of max and min, which ha... (by Chervil)
by lolwe
Sum of digits in random generated numbers in array
 
Write a program with a function main () and selecting a menu of functions: Generate a programming-random number generator data for lottery ticket / max 100 / w...
[4 replies] Last: You've got the number generating function correct. Your second functi... (by fg109)
November 2012 Pages: 1... 4445464748... 75
  Archived months: [oct2012] [dec2012]

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