Beginners - November 2012 (Page 23)

Coding an assignment in C..
 
I've been asked to do an assignment that does the following A) input each test result (1 2 or 2), display the program display "enter result" each time the pro...
[3 replies] Last: RobL, Start with your editor, first, whether that is notepad or VI or... (by Incis B)
Add element to array
 
Hi, How can I add an element to an array.The array is typeInfo which is my structue type. I got through a process of asking the user for infor Something ...
[10 replies] Last: So I have an idea I will write it .Tell me what you think. 1. Have a ... (by jlillie89)
by Batyr
OOP- Data Conversion
 
Hello, I've been asked to do a class project regarding data conversion using classes: Here is the task itself; Create a class to operate on English measure sy...
[no replies]
by morls7
Need help!
 
I need to create an array with 100 random numbers and then sort them in descending order. This is what I have so far (I'm pretty sure the problem is to do with ...
[4 replies] Last: I also couldn't get return(); to work, - in either subrt'n. I did s... (by Incis B)
two triangles
 
hello I'm stuck in a problem, i need to design the following shape: nnnnnn n n nn n n n n n n nnnnnnn basicly two triangles like...
[1 reply] : that shape is wrong i mean this its to triangles one over another (by dilicious)
Ned help with mean()
 
Hi guys.I need help with C programming. Im sorry that its not C++ but I hope Im welcome to ask still. How do I declare the function "mean()"? And how do I d...
[3 replies] Last: Ok I think Ive solved it. But thx for help. (by cbeginner89)
Nested 'switch' loops
 
EDIT: Code deleted due to it being for my assignment.
[2 replies] Last: That kept it there! silly me; cheers! (by testtest)
Help defineing class in cpp file
 
I've googled but cannot find the solution. Heres a small simple version of the code that gives the problem class GAME { public: GAME(sf::RenderWindow &...
[no replies]
HELP!!!!
 
I have an assignment to do for tomorrow: •Write a program that: •1) Creates an array containing 100 random double numbers in the [0,250) range; •2) S...
[2 replies] Last: Thank you so much!!!!!!! (by mreihill)
by kry
What am I doing wrong
 
I'm trying to find the ratio of two squared values using a function. #include <iostream> using namespace std; double square (int sp1, int sp2) { return ...
[1 reply] : ^ is the XOR operator. I suspect you're looking for the pow function... (by Moschops)
What wrong with my code
 
Im in my first semester of computer and c++ is my first language so forgive me if I dont use correct terminology. Anyways when I run my code it does what i want...
[3 replies] Last: @trojansdestroy: you are wrong about the missing brackets. When the in... (by toum)
New here!
 
I am new in this forum and I would beg your help and cooperation in general. I'm happy knowing that I'm going to share the knowledge I'm having in this field. ...
[2 replies] Last: clrscr(); and getch(); aren't standard and won't work on many syst... (by Moschops)
New to C++ and need help!!
 
I cannot find out what is wrong with my meanFunction. It keeps returning a weird set of numbers. PLEASE HELP! Code Posted: #include <iostream> #include ...
[3 replies] Last: That fixed the issue... Thank you Toum! (by closed account zqXLy60M)
cin.getline() skipping input!
 
Hey, I'm still relatively new to c++. I have a definition of cin.getline(array,arraysize); "This call reads input until the first newline or until arraysize ch...
[no replies]
read paragraph by paragraph from a text file
 
hi guys i am trying to read a text file which is like paragraphs and each line gives different information and also each words of the line gives a different inf...
[no replies]
Rand() not working
 
I'm trying to create and simple card game. When i test it, it gives me a random symbol that has nothing to do with the code. Am I using rand() wrong? #include...
[4 replies] Last: Thanks for all the help, ill fix it now. The to_string function solved... (by Ghilliedrone)
Random Number (Computer uses 0 every time)???
 
case 'B': {int num; srand(time(0)); num = rand() % 100+1; game(); ...
[2 replies] Last: If your compiler supports C++11 well enough, you could use the random... (by Catfish2)
What's wrong in this program.plz tell me (1,2)
 
#include<iostream.h> #include<conio.h> #include<iomanip.h> class converter{ private: int x,y; public: int get(int); }a; int converter::get(int y) { c...
[24 replies] Last: The real point is not what anyone chooses to use . It is what they ch... (by Chervil)
by Soni
How to declare char variabel in .h file and on that use strcat operation.
 
Hello, I am trying to do is declaring all my variables in .h file. The variables declared in .h file will be referred in .c file. My code is as follows: ...
[3 replies] Last: The problems arise because the class headerFile uses simple pointers. ... (by Chervil)
Im confused how this if statement is working
 
if(alive) { m.killMonster(); //alive variable in monster class is set to false. l.addMonster(m.getMPosX(),m.getMPosY()); } when the program ru...
[1 reply] : Maybe you should FIRST get the monster's position, THEN kill him and s... (by S G H)
November 2012 Pages: 1... 2122232425... 75
  Archived months: [oct2012] [dec2012]

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