Beginners - April 2016 (Page 35)

Function to find average and drop lowest and highest
 
Had this up and then thought I had it, but I definently do not. This is my first array ever so please do not be vague with answers. The error I am getting is li...
[13 replies] Last: Thanks man, your way ahead of me with arrays so I was having a hard ti... (by miah612000)
Help with Tic Tac Toe game not displaying Xs and Os
 
So I have an assignment where I need to implement a Tic Tac Toe game for board sizes of 3x3, 4x4, and 5x5 games. Upon switching from a 1-9 numbering system to ...
[1 reply] : char tile = b ; currentMove and currentColumn are char types... (by cire)
rand() problem
 
int main() { srand(time(NULL)); int bunny_name_index = rand() % 100 + 0; std::cout << bunny_name_index; } first run: 84 second run: 87 third run: 90 why ...
[10 replies] Last: For completeness, no thread on C++ rand would be complete without a wo... (by Moschops)
Prime fib numbers
 
I'm trying to write a program to output the first 5 prime Fibonacci numbers but for some reason it's printing out numbers that aren't prime #include <iostrea...
[3 replies] Last: Update: I got it thanks for pointing out it was printing the ith Fib n... (by bnaranjo)
by dormeo
Create a number of loops equal to an input
 
Hello, I want to print out numbers in a sequence like this: for example, if the input is 3, the output should be 111 121 211 221 311 321. I found out that in or...
[1 reply] : http://www.cplusplus.com/forum/general/183225/#msg897029 (by helios)
Debug help for this simple short code?
 
Why is there a difference in output of these two same functions. If you test out factorial(3) and two(3); the factorial gives out list where as two gives out j...
[2 replies] Last: @Moschops Ohhh! This is a good trick. Thank You! (by sadij97)
Access to initialized vectors from several class methods
 
Hello, I have several initialized vectors and iterators that I'd like to be able to access from several class functions . how would I do this without having t...
[3 replies] Last: You should be able to do it in the class constructor. (by MikeyBoy)
Palindrome Detector Problem
 
So ive attempted at creating a palindrome detector but everytime I run it I enter the palindrome test string and the console pauses having seemingly run through...
[3 replies] Last: For example, with the input word "beans" testPalin.erase(testPalin[t... (by Moschops)
by thor36
How to solve SIGSEGV fault error?
 
Greetings all, I have problems with a program, which builds successfully (0 errors/warnings), but crashes on running. GDB (Gnu Debugger) and then bt (backtrace...
[2 replies] Last: Thank you for your response. Yes, sorry for being short in my problem ... (by thor36)
error: function declared as inline variable HELP!
 
I am following a book on c++ and I have got stuck with this. There is a separate .h file with the add function in it and a .cpp file with a main function in it....
[2 replies] Last: #include "add.h" inline int triple (int x) {return add(x, add(x... (by kinggamer1235)
char arrays/encryption/decryption help!!
 
The program I'm writing needs to encrypt and/or decrypt a message entered by the user. It's suppose to get all of the message's odd characters and all of the ev...
[no replies]
Searching through a vector of a class of objects
 
I've got a .h class called data class data { public: /*! * constructor and destructor */ data(); virtual ~da...
[7 replies] Last: You have shown void dataRunner::populateVector(vector <data>& dataVec... (by keskiverto)
What's after c++
 
Just a simple question, if I have finished the introduction of c++, what should I learn next? Some people said I should give the oop a try, but I'm not even sur...
[12 replies] Last: A class is a user defined datatype . The core language provides ver... (by keskiverto)
Defining header file contents for drawing a card
 
Hi all, I have just started in C++ and currently I am having trouble with my assignment in which the question in itself sounds very vague? The question is as fo...
[7 replies] Last: Thomas195 is right. Advantages of doing it his way include: - You can... (by dhayden)
by Bopaki
An error on a certain line of code from the memorandum of a tutor
 
Write your question here. Is there an error or this line or not? Put the code you need help with here. friend ostream& operator<< <>(ostream&, const li...
[7 replies] Last: Ahh, now we have seen three versions of the friendship: friend ostrea... (by keskiverto)
3D vector
 
Can I use vector like this vector< vector< vector<int> > > M; //declare a vector of vectors of vectors. if(M.size()<a){ //resize when i...
[9 replies] Last: My prof. took a task similar to KDDCUP2012 track1 for assignment. I ha... (by tomtran3110)
by hayyan
software to create c++ GUI app?
 
what software is best and easy to use OR easy to find tutorials to learn the software which i can use to create C++ GUI apps? name of software
[4 replies] Last: I second the recommendation for Qt. It's big, and may seem intimidati... (by MikeyBoy)
Why wont this program work?
 
Im suppose to create this random number generator and i have two different programs. But neither work. What seems to be the issue? Purpose of the program: Cre...
[5 replies] Last: that will not compute properly What does that mean? We can't read y... (by MikeyBoy)
by kidura
guide me on this code
 
i have the code below which calculates trimester grades. i want it to do for five trimester and each trimester a student should study for 15hrs and a total of 7...
[no replies]
Problem with numeric_limits<double>::digits10
 
I wrote a program to find the limits and the number of digits for different variable types. This - int(log10(my_var)) + 1 - works for integer, float, and do...
[2 replies] Last: digits10, as explained at http://en.cppreference.com/w/cpp/types/numer... (by Cubbi)
April 2016 Pages: 1... 3334353637... 43
  Archived months: [mar2016] [may2016]

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