Beginners - April 2013 (Page 8)

Program execution delay
 
Hi all! I need to make time delay in my program, but I do not have much experience with time libraries. Program uses graphics, so I need it to freeze at each po...
[4 replies] Last: I think this is working. Program does go a bit funky, but I probably h... (by Nina Sma)
Help with quadratic equation solver
 
Was wondering why this bit won't compile. I get the errors in the line r1 = ((-B) + sqrt(B^2 - 4*A*C)/(2*A); . before, when types A, B, C, r1 and r2 were...
[5 replies] Last: I know in quadratic formulas, there is a possibility of "imaginary num... (by crimsonzero2)
by fmdub
Postorder traversal in depth-first search
 
I've got what looks like a properly functioning DFS implimentation. The only problem is, I am having trouble coming up with a way to display the post-order trav...
[2 replies] Last: If it's relevent, the successors() function is here: std::vector<int>... (by fmdub)
by Dawn76
Day of the year not computing.
 
Good Evening, I have looked at this till I'm cross-eyed and then some. I just can't seem to find the reason it will not compute the correctly. No matter wh...
[3 replies] Last: What does line 78 do? The else statement cannot have a condition, plu... (by TheIdeasMan)
How to randomize a number between 1 and 2
 
Hi. I'm making a text adventure game and I was wondering how I could randomize a number. (BELOW IS A PART OF MY CODE) Score is declared earlier in the code. I ...
[7 replies] Last: Thanks! (by closed account LyUoGNh0)
Diamond pattern I almost have it
 
I'm trying to create a diamond out of stars. I'm close, but clearly I don't quite understand how these for loops work. Can anyone suggest a fix for the bottom h...
[2 replies] Last: Thank you so much! Now I have to use that in a function. I'll probably... (by Gargoyle)
by djibn7
CANNOT IDENTIFY ERRORS
 
I am having difficulty to identify the errors with this coding here. Can anyone help please? #include "stdafx.h" #include <iostream> using namespace std; ...
[10 replies] Last: and thanks @Pilla means alot mate (by djibn7)
Pointers exercises
 
I searched through this forum and Google too but I haven't found any simple pointers-only exercises. I need them for better learning. If someone had any I wou...
[15 replies] Last: > I apologize ... Don't apologize for having made a genuine effort to... (by JLBorges)
Coventing string to int/int to string
 
If i have a string "123" how can I convert it to the int 123 also, how can I do it from int to string?
[5 replies] Last: Finally works, thank you for all of you (by closed account oLC9216C)
by cshu
functions
 
I am getting these errors: error C2660: 'displayList' : function does not take 0 arguments error C2660: 'displaySortlist' : function does not take 0 arguments...
[4 replies] Last: each of your functions need parameters for each time you call them, su... (by twiggystardust)
Could you help me to finish this code (C++)?
 
Write your question here. Create a program that will generate a list of 200 random numbers (ranging from 1- 1000) and determine the medium, mode, and average o...
[1 reply] : Well first of all, do you know about indenting and spacing? If not, it... (by twiggystardust)
Get medium mode and average of the list of numbers. Display the original list and the list in ascending and descending order
 
Could you help me to finish this C++ program? Put the code you need help with here. #include <iostream> #include <ctime> #include <cstdlib> #include<...
[no replies]
by Abdo2
My code any solution
 
My code is #include <iostream> #include <cstdlib> #include <ctime> #include <string> using namespace std; int main() { string lol ={0,"1heart","2heart","3h...
[4 replies] Last: I Hope So :) i see it now :) Thanks (by Abdo2)
c program abt array structures passing function
 
//1ST FUNCT int collection_random_numbers(user a , int v) // varaible user and a as array. { int i; printf("\n* Enter the numbers * : \n"); for(i=0; i...
[no replies]
Am I using this vector wrong?
 
#include <iostream> #include <string> #include <vector> class Object { protected: std::string name; int id; int value; public: ~Object() ...
[12 replies] Last: > the way to added inventory with the "&" operator didn't work If th... (by JLBorges)
Interactive Console Application Runtime Bug [C++]
 
Hi. I am making a "blueprint" for a survival game similar to Cataclysm:DDA. When my character 'W' is moving vertically, I can press left or right to move ...
[no replies]
something wrong with my code
 
WHat is wrong with this pound to dollar converter?? #include <iostream> #include <stdio.h> using namespace std; int main(){//this is a dollar to pound c...
[1 reply] : 1. Do not mix iostream and stdio.h. Use one or the other (Probably ios... (by Daleth)
Nested While Loops
 
I have a program here: //David Scheip //Created 4.27.13 //Page 523 Number 3 //Use a nested for loop to print array a and a nested while loop to print ...
[3 replies] Last: Thank you both... I can't believe I did that!! I was staring at this ... (by toonhead85)
string question
 
I have the position to start, and the length of the sting that I want How can I get that string? For example, Hi, how are you? how can I start getting th...
[3 replies] Last: Then you can string.erase more than once mystring.erase(starting posi... (by SamuelAdams)
template and copy constructor error finding
 
Q. Explain at least three things that can go wrong template<typename A, typename B, typename C> C mymin (const A& a, const B& b) { if...
[1 reply] : > But I still need two more possible cases... Please help me. In tem... (by JLBorges)
April 2013 Pages: 1... 678910... 83
  Archived months: [mar2013] [may2013]

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