Beginners - October 2014 (Page 64)

i need some help about the loop construct
 
i need to use the loop construct to write a program for the users to guess a secret character, which is k, (between lower case letter ‘a’ and ‘z’) store...
[2 replies] Last: Rough draft: char secret = /*...*/ char user_guess; int i = 3; while(... (by MiiNiPaa)
permutation
 
how may distinct ways can you arrange n different objects in a shelf of x spaces. (filling the shelf for each permutation) e.g objects (1,2) shelf...
[1 reply] : how may distinct ways can you arrange n different objects in a shelf ... (by MiiNiPaa)
Hangman with Hint problem
 
I get this error messages from my code: problem on line 193 expected primary expression before'{' token expected primary expression before'.' token expected ...
[5 replies] Last: how can i fix it? should i remove it? (by Shirwyn)
What's the Difference?
 
I can not seem to grasp the difference between creating objects derived from structures/classes and creating pointers that can use the functions derived from st...
[3 replies] Last: Another reason for using a pointer would be for something like this: ... (by megatron 0)
manipulate element within a distance of x
 
I am looking for a method in which i can manipulate elements in a matrix a certain distance, from a certain point. an example could be. given int m...
[2 replies] Last: The idea is it has to move like a wavefront planer.. I've created a me... (by DrJones)
function return type ONLY in some circumstances?
 
Is there a way I can choose whether or not to return a Class type from a function depending on user interaction with the function? Here is an example code: ...
[3 replies] Last: If you are familiar with exceptions: include <iostream> #include <st... (by JLBorges)
by wolfv
"undefined reference" link error in Makefile
 
This was running before I changed Row to a template class. Now it gets this error: >make g++ -ggdb -Wall -std=c++11 -c ../../lib/ScanCode/Sa.cpp -o obj/Sa.o ...
[4 replies] Last: I like your strategy of not having .cpp file if it should not be compi... (by wolfv)
Access to parent class instance
 
Hello, What is the best way to access an instance of a parent class from a child class. Do you use singleton, virtual inheritance or something else? Th...
[3 replies] Last: I would say virtual base classes is out, a NewDocumentSelector is not ... (by Lowest0ne)
by Ch1156
std::bind help
 
The GUI library uses std::bind in the button but It wont work because the function has arguments, I've been looking up stuff on it but i cant seem to figure it...
[no replies]
by Squidy
Finding Number of Integers Divisible by Divisor Between Two Bounds
 
For an assignment, I need to write code that takes 3 inputs: a lower bound, an upper bound, and a divisor. The program is then supposed to output the number of ...
[16 replies] Last: U of L? Was googling around for help on this assignment, found this, s... (by mrmetronome)
Reading from File Contents to File / Outputting to a File
 
Hi, I am struggling to get my program working. The directions are to write a program that reads sorted integers from two separate files and merge the co...
[1 reply] : First off, add a 'endl' to the end of your output writes. Otherwise th... (by Esslercuffi)
-1 array value?!
 
can please, anyone explain to me, why the hell does this code works? #include <iostream> using namespace std; int main() { int arr ; arr[-1] = 2; cout << ...
[9 replies] Last: @MiiNiPaa I like the foobar2k reference also thanks all for responses... (by mekkatorqu)
by kemkoi
Problem using random function.
 
Hello, first of all I should say I do not get any compile errors, however the code is not working as I want it to. I'm trying to create a program that genera...
[6 replies] Last: Oh sorry kemoi, i didnt see your input function. In that case, you hav... (by shadowCODE)
by BaneX
Trouble with output of my program.
 
Why is it that the first IF executes and the rest is not found. Please close
[1 reply] : your problem is in this line "if ((studentID > 9999) || (studentID < 9... (by Esslercuffi)
Reverse my code, help
 
I have the correct code, but I can't seem to reverse the order of how it appears. #include<iostream> #include<cmath> using namespace std; int main(){...
[2 replies] Last: hello dear ! read the comments in code. here is the reversed code fo... (by Rahmat)
Functions - I don't know what to do.
 
I need help getting started with my assignment. The program must store the player’s cash in a global variable. You must use a function to draw a die on-...
[1 reply] : http://www.cplusplus.com/doc/tutorial/functions/ (by Disch)
Passing array as function argument
 
Here is my code. When I run this, it shows |29|error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive]| Why? #include <iostream> #in...
[1 reply] : You're passing t1 twice, so the only problem is you're just passing to... (by TheKingOfTyrants)
Binary tree help!!!
 
hi guys, I need your help i took from internet a code for insert nodes in a tree but its for search binary tree i just wanna insert this values {1,2,3,4,5,6,7} ...
[no replies]
Vector question
 
Write your question here. return calibrateCamera(*((vector<vector<Point3f> > *)ObjPoints),*((vector<vector<Point2f> >*)imagePoints),*((S........ So...
[2 replies] Last: Thanks (by DaGoblin)
program.exe has stopped working
 
Why doesn't this program work? Whenever I run it windows gives an error message and it shuts down #include <iostream> using namespace std; //store t...
[2 replies] Last: Like this error message (but in swedish and "program.exe"): http://th... (by tobpe93)
October 2014 Pages: 1... 6263646566... 70
  Archived months: [sep2014] [nov2014]

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