Beginners - November 2014 (Page 34)

by aggsyb
editing variables in classes, need help!
 
Hi, I have a class inside of a header file with a bunch of public variables. I can access and use these no problem at all I can modify them too (great!). My pro...
[13 replies] Last: If you're going to pass just the object as a reference argument to cal... (by AbstractionAnon)
Error about header file
 
Hello, i have create the below program to find the smaller number. The program include a header file (min.h) but when i run it show me the error: D:\C++ pei...
[3 replies] Last: Yes, i change the code and there isn' t error!! Thanks! (by karamaniotis)
by savanh
please your help
 
-lk
[1 reply] : Line 7. How many characters are in the word that the user did type? Yo... (by keskiverto)
When you make a class the friend of another class, is it required to use a prototype to access its members?
 
When a class has been declared as a friend in another class, does the friend class have to have a prototype in order for the other class to use to access its pr...
[4 replies] Last: No. friend declaration means "I give this class rights to touch my pri... (by MiiNiPaa)
Creating a function to lowercase a string.
 
I have to implement: string tolower(string str) , which lowercases all alphabetic characters in the string. This code works by itself: string str = "HELLO...
[6 replies] Last: I forgot to include the parameters in the prototype -_- Thank you for... (by llllllll)
what printf should i use to get this effect
 
I want to print a n*n array with words filled(in this case, is 4by4, but could be other size as well). I'm wondering how to align the words and numbers like the...
[2 replies] Last: I got the idea but the column and row's size vary and could be 4, 6, 8... (by imaghhc)
Why isn't my "friend" function working as intended?
 
I am trying to make a friend function in a class definition that has access to the private members of another class definition, but so far the compiler keeps sa...
[6 replies] Last: I was just experimenting with the friend functions so that I can under... (by SomeAmazingGuy)
by omer09
Finding MIn and max values BUt ?
 
I was trying to make a program which would max and min values for five inputs >> Bout i get a bug :: when i try to enter 1 , 2 , 3 , 4 ,5 it gave me max =...
[3 replies] Last: You may want to store a,b,c,d,e in an array and find de max in a loo... (by YokoTsuno)
C++ Game Market?
 
Hey guys, I was wondering what game market you can put games on using only C++? For example, using Java to code and to create Android apps on the Google Play ma...
[3 replies] Last: Put it on Steam (see Greenlight: your game will be voted by the commun... (by S G H)
File IO
 
For this program the main function was provided and is shown below, also implementing the functions given and also shown below. I am having difficulties impleme...
[1 reply] : Make sure you have some place to store the numbers. You know you will ... (by JayhawkZombie)
2d Array
 
Hi all, would appreciate if someone could solve my problem. I am creating a 2d array to store x , y vertices to make into a shape of square. AS i am a beginne...
[2 replies] Last: Sensor data is when user enter choice 1 to enter data for a shape. Sys... (by explorearound)
by Akigou
Sum of numbers: Loops
 
Write a loop that calculates the sum of the numbers 21, 22, 23, .., 39. The sum is to be written out after the loop terminates. I'm stuck on as to how to sta...
[2 replies] Last: Forget the sum. Write a for-loop that prints those numbers. (by keskiverto)
Merge Sort
 
Hey, everyone. I'm working on an assignment for programming, and I cannot for the life of me make my merge sort work. I know I am definitely doing something w...
[no replies]
by Scizor
Simple question about storing to an array
 
This code should be extremely simple. All it needs to do is take a char(letter) entered and then store it in an array(letterHistory) separately. As you can see,...
[1 reply] : xs means "element n of the array xs". There is no element 26 of your... (by Duthomhas)
Problem with Assigning to Vector!!
 
Can someone explain to me how I would go about assigning the vector<float> value in the example below a new value AFTER the program runs? When I resize the v...
[1 reply] : This code is really confusing. The culprit here is that your oper... (by Disch)
Apple Mach-O Linker Error
 
I am new to c++ and I am programming in Xcode. I believe my problem lies in my #include statements, but I'm not sure. Most of my program is a skeleton, so it do...
[no replies]
Graph problem
 
Hi! So I'm trying to write a program that creates a graph from a given maze. The maze is decently complex and the qualms that it entails are that: you can only ...
[1 reply] : I presume you must start at zero and stop at ninety-two? I've drawn th... (by Duthomhas)
Determine Frequency of Entered Letters
 
It all works fine except all of my 'a' values are always 1 less than they are supposed to be. For example: aaa Will come up A: 2 void LetterFreqIO() { ...
[2 replies] Last: Consider an input string of "abc" - Line 9 reads 'a' into input - Line... (by dhayden)
what does double * as parameter of a function means?
 
thats it... im doing a binary tree as homework, but my code was not working till' i added the double **... so i wonder what does it means... this is my code:...
[7 replies] Last: woah thats crazy, i have enough atm with pointer to pointer =P (by dualdark)
Trying to create typing rpg
 
Hi, my question is, could anyone explain or "borrow" me the code for: In my game I would like to create an item that its chance of hitting the enemy is 80% and...
[3 replies] Last: Well 80% is 80/100 = 8/10 = 4/5 so that would mean if the number you g... (by giblit)
November 2014 Pages: 1... 3233343536... 65
  Archived months: [oct2014] [dec2014]

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