Beginners - January 2013 (Page 19)

can anyone here help me to solve this problem
 
hi experts can anyone here help me to solve this problem Problem Statement: You are required to write a program for calculating area of Trapez...
[12 replies] Last: Why do you need that line? I say remove it from the code. (by Santosh Reddy)
Swapping
 
#include <iostream> using namespace std; int main (void) { int x; int y; int temp; cout << " input x: "; cin >> x; cout << "input y: "; cin >> y...
[8 replies] Last: Try cout << endl; after the last cout statement. That should flush ... (by Chervil)
Inheritance
 
Hi All, I'm currently in a C++ programming class and have to create a bank account hierarchy using inheritance. The teacher provided us with a template and we h...
[5 replies] Last: use data type "class" (by m1rv9n41v5)
Associating values in arrays
 
I have a data file that looks like the following: 1 35 4 55 3 20 21 125 12 33 7 4 22 355 4 3 1 32 21 556 25 33 I'm trying to write a...
[2 replies] Last: C++ has standard container std::map . (by vlad from moscow)
by gml23
Help with c++ program
 
#include <iostream> using namespace std; void fillarray(int x, int ); void displayarray(int m, int ); void sortarray(int p, int ); int main() { ...
[2 replies] Last: Segmentation fault is not guaranteed. Because you're going out of the ... (by Zaita)
by Milun
srand() and multiple classes
 
Hello, I've been having a minor issue with a game I'm writing in Codeblocks using SDL. My problem is, srand(). I seed it to time like so in the main function: ...
[2 replies] Last: ...OOPS! Man I feel silly. I declared a few objects BEFORE I called sr... (by Milun)
by Oria
rogue style map generator
 
Alright, so I am still very new to C++ and this is one of my first project with that language. I am posting it here to get some feedback if possible to know wha...
[1 reply] : The Main cpp is this: #include <cstdlib> #include <iostream> #inclu... (by Oria)
returning a reference from a function?
 
hey, i have a question about returning a reference from functions. It could be returning member function for classes, regular functions, class helperfunctions ...
[7 replies] Last: [quote=Assassinbeast]Hmm ok, but the only difference between returning... (by LB)
by er111a
Visual C++ Debug
 
'random.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll' 'random.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll' 'random.exe': Loaded 'C:\Windows\winsxs\x86_...
[2 replies] Last: This is correct output, no problems here. (by JockX)
How to store a value in an array using several indexes
 
hey, I am working on this project where I need to store a value in an array but it needs to be stored over 4 indexes of the array. The array that I am using to...
[2 replies] Last: If you had problems with bitshifting, maybe you used signed char array... (by JockX)
DRAW WITH TEXT "T" SHAPE
 
http://img833.imageshack.us/img833/6472/semttulonem.png I need help doing this shape, its kiling me. C++
[12 replies] Last: Oh I forgot to mention in your code you have: if (j=c) what this is... (by BardaTheHobo)
Trouble with random number generator.
 
Ok so I'm working my way through a c++ book and as a project on my own I wanted to write a program to simulate the roll of a die 10 times. The only problem is w...
[4 replies] Last: Ok its working properly now thanks guys. -T (by Tick Talos)
Overloaded operands: Comparing two strings
 
I know you should not compare two strings like this bool operator == (string c) { if ( city == c ) return true ; return false;} You should use strcm...
[2 replies] Last: This page lists the prototypes for, among other things, the equality o... (by Zhuge)
by Hucaru
Linked list (1,2)
 
Hi, I am working through the graduation problem on this page - http://www.cplusplus.com/forum/articles/12974/. However I am having two issues at the moment. Fir...
[23 replies] Last: You're welcome. I had to find the bugs because I couldn't find any mor... (by closed account D80DSL3A)
by ycai77
Unexpected result regarding comparing two pointer-related integer values in C++
 
I have a BST of three elements {1, 2, 3}. Its structure looks like 2 / \ 1 3 Now I try to calculate the height for each node using BSTHeight() de...
[2 replies] Last: Thanks a lot, Moscow. it works. So it means operator '+' has higher p... (by ycai77)
by ofey
Vectors- Basic Doubt
 
I am very new to vectors and would like know how assignment works in case of a vector of vectors [2-D Vector]. I want to input a list of elements(from stdin) t...
[3 replies] Last: Thank you. (by ofey)
by rawar
a problem with template
 
Hello, I'm doing a programme for vector calculation. I want to do it with template and classe. All operations work accept beside calculation vector length. Can ...
[2 replies] Last: Thank You for Your help. My programme is already running:). (by rawar)
by adrem7
Getting a point on a sphere to sit at the north pole with all other points rotating the same amount
 
Say I have 10 points all on a sphere (randomly distributed) and I want to rotate the entire system to make sure one point sits at the north pole. How would I do...
[1 reply] : So I screwed up on line 85 by using the same variable. Should look lik... (by adrem7)
by lmsmi1
Read a string/value between two strings.
 
For my game, the weapon definition files are coded in XML format. I would like to make my own custom XML parser for the game. Say I have this: <flag>FULLAUT...
[2 replies] Last: Okay, so no go on the custom XML parser. And which language do you guy... (by lmsmi1)
by sin984
simple noob problem with variables
 
Hi, I have seen variables such as 'int' for non decimal numbers and 'char' for letters... but how would I go about declaring cout text? Thanks. if(answer >=...
[5 replies] Last: Thanks for the help guys! 2 days later and it's finally solved. Thank... (by sin984)
January 2013 Pages: 1... 1718192021... 52
  Archived months: [dec2012] [feb2013]

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