Beginners - December 2012 (Page 29)

Using Vectors and Arrays to display five names, heights, weights
 
I have this code that should display five names, heights, and weights: #include <iostream> #include <string> #include <vector> #include <iomanip> using na...
[14 replies] Last: Okay, I think I'm understanding now. Somewhere in the text I missed s... (by aidenkael)
Bad access code
 
Really having hard time understanding this error. I have multiple mains and headers so it would be too long to paste in here. For starters I would like to under...
[1 reply] : http://loufranco.com/blog/understanding-exc_bad_access Hello google. (by cire)
Files and Class Array
 
I have created a file with information pertaining to the information in my class. 1) How do I take in the file? 2) How do I create an array of an class? 3) W...
[1 reply] : Without seeing the rest of your files or the code it's hard to say. Ha... (by Raezzor)
C++ Class Program
 
I've been getting some compiler errors for my class code for the setWeather lines in the main program, and "request for member setWeather in inputWeather . whi...
[6 replies] Last: In DisplayInfo, you are using inputWeather .name, etc, to output the i... (by Raezzor)
Program with Multi-Dimensional Array
 
Hey guys, here I have a program that's supposed to generate a maze. It is not completely finished, and there are a few problems, but what stumps is how to pass ...
[2 replies] Last: It is strange enough that you defined constant size const int size =... (by vlad from moscow)
Assignment dealing with classes...
 
Hey guys I need some help with an assignment I'm working on. It tells me to write classes for Author, Publisher, and Book. An Author and Publisher object has to...
[no replies]
by Shiro
inner class acess
 
im trying to acess parent class properties from inner class... but seems nor working eg: class Parent { char *Name; class Inner { I...
[6 replies] Last: No, this means that you can't default-construct an object of a class w... (by Cubbi)
constant elements vector
 
I'm experimenting with constants. I would like to append few elements in vector which will remain constant. For eg: const int a = 3; const int b = 5; st...
[3 replies] Last: With STL containers, the value type is required to be assignable . (n... (by Thumper)
now why would this program only print the first line of the txt file
 
i put a cout in the constructor and the compiler proved that box was filled with the txt file in the form of an array, now to use it in another function...i onl...
[3 replies] Last: oops! thanks...dumb (by devonrevenge)
find two largest values for 10 numbers
 
following code is used to find the largest value for 10 number, using similar approach, find the find two largest values for 10 numbers. You may input each numb...
[5 replies] Last: @Marcos, short and nice. worked. thnx. (by dipen45)
by ANGAY9
HELP PLEASE!!!
 
Hi.I have to write a c++ programm with a stack struckture.The task is to count if the number of such "(" brackets is equal to ")" these ones.If for example we ...
[3 replies] Last: Please don't provide code to someone who has not offered up any of the... (by Kazekan)
Location in Memory
 
I have this code int main() { int a = { 22, 33, 44, 55, 66, 77, 88, 99 }; int* p = &a ; cout << "p = " << p <...
[3 replies] Last: Check out this: #include<iostream> using namespace std; int main (... (by Marcos Modenesi)
Limiting entries to only positive non-decimal numbers
 
... do { cin>>array ; }while(array <0); //Limits to only positive numbers What else should I write to make the user enter the number again if he t...
[1 reply] : The simple way to do it is this. int main() { int number; ci... (by closed account 3qX21hU5)
Hangman [redo]
 
Starting today, I will be remaking hangman and positing the pieces of my code as it grows. I have been working on it and I just want to see that I can do it. An...
[3 replies] Last: No, one call to srand is all you need. Consecutive calls to rand w... (by Branflakes91093)
Please help me to solve this ATM Project .(C++ )
 
HI ;) I AM NEW in c++ programming; and i had a ATM Project ; but i dont know what i do :{ Your are about to simulate a simp ple automated teller machine (...
[3 replies] Last: My Code. /* Usandfriend's ATM Code */ #include <stdio.h> #include <... (by closed account 18hRX9L8)
by Izaks
I came across this challenging program which sort and search for arrays.
 
The assignment is to create a program that creates, sorts, and searches array. Your program will use both a bubble sort and a selection sort, to the arrays. I...
[1 reply] : Write the outline of your program, and create the functions for each t... (by SamuelAdams)
by Krue
strcpy not working in C++ but working in C
 
the code is strcpy(p->data, text); text is a const char* and p->data is a UDPpacket* from SDL_net. it works perfectly in C but when the exact same command...
[3 replies] Last: thanks, i cannot beleive i didn't solve this myself it is so simple an... (by Krue)
How do you display the number of iterations
 
How do you display the number of iterations it takes to find a number that the user would input into the binary search? /********** * * * *********...
[1 reply] : put this outside any while, if, for loop condition. int counter =0; ... (by SamuelAdams)
checking an int variable
 
Hi All I am writting a menu, where a user will use a number to choose their option. How do i stop the user from entering a char, or check to make sure that i...
[9 replies] Last: You can just input a char and check if it is a digit or not. #inclu... (by PalashBansal96)
urgent please help
 
can someone please help me fix my code so that the it shows the following output SAMPLE OUTPUT How many values do you want to enter? 5 Enter values separa...
[5 replies] Last: I did not look at length, but Min and Average was working. (by SamuelAdams)
December 2012 Pages: 1... 2728293031... 65
  Archived months: [nov2012] [jan2013]

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