Beginners - June 2014 (Page 9)

graphing using basic c++
 
Write your question here. Hi, for an assignment I have been asked to plot a set of random points in the cout. I am not supposed to use any graphing library. ...
[1 reply] : If you want to use a 2D array/vector, that is a good start. If you're ... (by Ganado)
First Program, Review Please 20~ lines.
 
First, Hello everyone!! After 1 day reading thru ~2 chapters of Stroustrups book I have written the following mini program. My question is with the answeri...
[5 replies] Last: Thanks Chervil . You understand my point to a 'T'. AbstractionAnon ... (by ibdv4521)
Defining 2d Array Crashes Program
 
I've got a class called Shop with x2 2d arrays in it. When I call the function to define the values of the arrays my program crashes. Am I defining the arrays i...
[3 replies] Last: All the shame. Thank you. (by dfurball)
Pancake Glutton Code
 
I want to know... What's bad in this Pancake exercise code? am i on right way of logical thinking or not ? #include <iostream> using namespace std; cons...
[2 replies] Last: Thanks for really helpful answer (by Dijinio)
binary tree destructor
 
I'm trying to make my destructor which will free up my entire binary tree. From my research online, it seems like a lot of people use recursion, but I just can...
[1 reply] : You do not need to handle parent. It will be already handled by previo... (by MiiNiPaa)
using <random> library
 
Hi everybody I'm using Borland C++ 5.02 on windows 7. I want to generate random numbers according to different distributions such as normal, uniform and ... I f...
[6 replies] Last: Thanks a lot (by mrtn kvn)
by kekie
Overloading + with a member function...
 
So, take the following; template<typename type, typename type2> double add(type x,type2 y) { return x+y; } class TrivialInt { public: int m_value; ...
[2 replies] Last: Thanks! (by kekie)
What is wrong with my code - the program keeps closing and how do I give a integer the value of a string?
 
I just started to learn c++ and went through the first chapter of this book I am trying to do this programming exercise "Write a C++ program that displays your...
[8 replies] Last: system("pause") is a dependent function which uses commands of the ope... (by Atyab)
Function to print 2D vector (win32api)
 
This function is supposed to print a vector<vector<char> >, but it doesn't seem to be working properly. Any idea why it won't work? void PrintMap() ...
[2 replies] Last: This function is supposed to print a vector<vector<char> >, but it do... (by cire)
by xystus
Variables in void functions working with other void functions?
 
Is there a way to make variables used in a void function work in another void function. for example: class someClass { public: void someNumber() ...
[18 replies] Last: but this didnt do anything either because it still thinks yhp and ymp... (by closed account j3Rz8vqX)
Array - Don't understand where this function is getting size info
 
Hi! This is an excerpt from my book. I am confused about a small thing, where is the void function getting the number for size from ?? @__@ #include <...
[2 replies] Last: Ohhh! I see, thank you very much! :D (by NookLines)
Use of undeclared identifier
 
Hello, I am getting the error "Use of undeclared identifier." I am sure that I have declared them, but apparently not in a proper manner. Still, I can't find wh...
[2 replies] Last: Got it. Thanks. Yep, that cleared up a lot of the issues that I was ha... (by twomsPls)
by vtk
Selection sort will assign a number thats not in the array to an additional element it creates
 
i cant get a number that's not in the array to trigger my cout statement that says its not in the array rather it assigns it to a new element that's more than w...
[no replies]
error with a simple program
 
The program is supposed to display the days of the week from saturday to sunday using an array, which it does, but I get an error afterwards and the program has...
[5 replies] Last: Thanks (by PATBALM)
tic tac toe input validation
 
I've put together a tic tac toe game that works aesthetically, but I haven't done any of the input validation. I'm looking for advice on how to go about this. I...
[1 reply] : You should really separate your code into functions. That way it will ... (by MiiNiPaa)
Read Failed
 
Here is my code thus far, I am attempting to create a simple payroll program. It is supposed to display the two employees that I have created, one for a moment...
[8 replies] Last: Thanks for your patience Chervil. I will use you advice for the 'stri... (by DEnumber50)
Diagnol 1's in array
 
Hi my function FunorRel is not working properly for some reason. I am passing in the array, domain, and range. The purpose of this function is to see if domain ...
[no replies]
C++ Textfile data read by one digit integers
 
I tried to convert text file including no spaced binary data file like "0101010..." in to spaced binary data like "0 1 0 1 0 1..." Please check my code and giv...
[no replies]
Symmetric Relation
 
Hi, I made a function that looks through a vector and looks through the pair of elements. Example: vector = {1 1 2 2 2 3 3 2} but actually its in pairs (1,1),(2...
[4 replies] Last: Why not use arr for the Symmetry test? Something like: bool Symmetr... (by dhayden)
find a key in binary search tree
 
Hi, I wrote a small function which i think should find a specified key in the binary search tree (given by root h). However i get error: Unhandled exception at ...
[6 replies] Last: If we reach line 12 in your function, will any value be returned? (by cire)
June 2014 Pages: 1... 7891011... 48
  Archived months: [may2014] [jul2014]

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