Beginners - December 2013 (Page 46)

Gravity in C++ using classes and lists (no graphical representation)
 
Hi! What I need to achieve is a program which will simulate gravity in 2D plane (only x and y axis), using Euler equation, based on class of an astronomical ...
[1 reply] : I've declared the class (not all the variables are there) class CBod... (by jfrantic)
by enemy
Input structure elements
 
Hello! Is it possible to input elements of the structure, like by cin, ..if I define a structure and then want the elements to be cinned in there .. Many tha...
[1 reply] : You mean like this example: http://www.cplusplus.com/forum/beginner/11... (by Chervil)
by enemy
what is line 5 doing?
 
Please, how did it come to line 5? What commands cause wrirting it out??? many thanks int* po(int b){ int d1; d1=3*b; int d2; d2=d1+5; int a ; ...
[9 replies] Last: [quote=I]Solution: ... Note: Undefinded , by definition, can be an... (by keskiverto)
Question about enum
 
Hi all! Ok, so let's say I have this enum: enum letters {A, B, C, D, E, F}; letters l; and I ask the user to choose a letter and he types D....
[3 replies] Last: #include <iostream> #include <cctype> enum letter { A, B, C, D, E, I... (by JLBorges)
by enemy
Error: new types defined in a return type???
 
Hello! Please, can someone make me clear wha tis wrong here? Many thanks! #include<iostream> using namespace std; struct person{ char name ; char gender; ch...
[2 replies] Last: How the hell wil lI look like with 80:bash:bash:bash!!! MANY THANKS!!... (by enemy)
by Ross
tic tac toe
 
Help me please. the game doesn't restart #include <iostream> #include <windows.h> #include <cstdlib> using namespace std; char square = {'o','1','2','...
[no replies]
by Feyy
Dynamic Memory Allocation
 
I'm currently learning about dynamic memory allocation and I am having a hard time understanding the benefit of this when it comes to class member variables. G...
[6 replies] Last: Alright, well thanks for your time!. Sorry for the awkward question :P (by Feyy)
by Ross
tic tac toe game
 
The game is suppose to let the player choose from whether play again or not. It seems my codes aren't working. Help me please. #include <iostream> #include ...
[no replies]
about Separate Compilation, how?
 
I have a header file, header.h //header.h #ifndef HEADER_H #define HEADER_H template <class T> void nice(T a) {std::cout << a << std::endl;} #en...
[2 replies] Last: I guess I know it. thanks (by q1670741824)
by enemy
array=constant pointer?
 
Hello! Please, is an array ALWAYS (by default) a constnat pointer, even if not particualrly written const? Many thanks!
[6 replies] Last: (YES!:D)Thanks!!! (by enemy)
When should I use virtual destructors?
 
Is this snippet respectfully coded? I heard when using a virtual destructor should only be reccommended if your using polymorphism and or a derived class thats ...
[10 replies] Last: I am just practicing with pointers and learning new tricks. I know I d... (by backslashx00)
by Anna22
Slot Machine Program
 
Well this class has blown my confidence all to 773H. I need to know why this problem won't select and print 3 elements out of 6 when randomly selected. It o...
[2 replies] Last: Firstly, line 18 is useless (and shouldn't even compile, you haven't i... (by TwilightSpectre)
Separating string and printing both
 
Would someone be kind enough to write me an example of code that would take a user input and separate it into two lines please? I understand better when I see ...
[4 replies] Last: No, unless you can. The code itself has no value nor use. The abilit... (by keskiverto)
Creating a christmas tree
 
Im new to programming and im struggling with creating a christmas tree. the code im cureently using doesnt seem to be right and ive got rather confused with why...
[3 replies] Last: http://www.cplusplus.com/articles/jEywvCM9/ That's how you use code t... (by closed account N36fSL3A)
Help with classes!
 
Hi, I am currently learning C++ and thought it would be a good idea to join a forum as you guys can probably explain things a lot better than a book can! So ...
[2 replies] Last: Thanks for the help, this way suits my level just fine! (by jamiekrux)
by Anna22
Prime Numbers Disconnect
 
How do I get this to work? The problem: use bool isPrime(int) for a looping program that gets a number between 1-29 from user, output will say if it is pri...
[2 replies] Last: Thank you. This helped in getting it working. (by Anna22)
fstream not writing to file
 
I have trouble again in writing to the file. Basically my program checks if the file is empty, if it is then you get the input and write to file. But, it does n...
[4 replies] Last: Thank you. :) I learned something new. Glad you got it figure out. Che... (by Tresky)
dynamic memory allocation for charector
 
please provide me the syntax to do dynamic memory allocation for charector array. like program which ask to enter the text and the the text get displayed.
[3 replies] Last: based on your code above, i think you want to allocate memory after ... (by nvrmnd)
Using the bubble sort
 
For some reason calling my bubble sort function to main is not working. It reads out: Error: argument of type "char(*) " is incompatible with parameter of type...
[1 reply] : sortArray (and showArray) take an 1D array of chars as an argument, an... (by ats15)
by Wiskey
Memory Matching Game C++
 
Hello all, I have a Memory Matching Game C++ project in my programming class due tomorrow and am a bit stuck. I have tried to manipulate the code by myself b...
[no replies]
December 2013 Pages: 1... 4445464748... 69
  Archived months: [nov2013] [jan2014]

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