General C++ Programming (Page 51)

How to diplay with decimals?
 
Hello, I am trying to make the code below display the result with decimals. I tried using setprec...
[4 replies] Last: It worked. Thanks guys. I could of sworn I tried that already. (by tnguy070)
by Glaven
Search User Input Number In Array Filled With Random Numbers Help!
 
I need to create A program That makes a 12x10 Array Grid Filled With Random Numbers From 0-99. Th...
[1 reply] : First, you need to change Array = rand() % (99 - 0) + 0; to Ar... (by Pindrought)
2D Arrays - Creating virtual Creatures?
 
So first I have to display a 2D array with all 0s, which is pretty easy. #include <iostream> usin...
[2 replies] Last: Thank you, I was able to finish the project successfully! (by Crypted)
by Jweim
Switch Statement; Summing items
 
I'm creating a program that is combining functions to show a menu to a user then the user picks numb...
[3 replies] Last: you may consider enumerating the menu or you could use a map :) ... (by mutexe)
Problem Creating a Game of 21
 
Hi all, I'm new to C++ and I am trying to create a game of 21 as part of a project for my Compute...
[1 reply] : This section: if (hitOrStay == 'h' || hitOrStay == 'H') { int numbe... (by mutexe)
by zepher
template function in struct
 
Hi All, I understand template functions and how to call them explicitly when no arguments are pas...
[6 replies] Last: > Can this creator be a class or struct instead of a namespace? Yes. ... (by JLBorges)
check if cin ready to read
 
How can i check cin or scanf is ready to read? There is a method in Java for this (java.io.Buffer...
[4 replies] Last: while (true) { if (cin is ready to read) { cin >> x; ... (by MiiNiPaa)
Help with macro (catenation)
 
I have some macros, as follows: #define CAT(st1, st2) st1 ## st2 #define STRING abc #define MACR...
[2 replies] Last: Works! Thanks! (by alterecho)
C++ Framework/Tools/IDE/Library ?
 
Hi all members. I want to know what are the best tools used by the big giants like Google,HCL,Mic...
[no replies]
Need help!!!
 
I am new to programming in C++, and have got a project on this. Could someone guide me the correct w...
[4 replies] Last: Yeah it has been.... (by closed account 3pf2y60M)
how can i make this mathematical formulation into coding
 
hello..i dont know if the title suitable i have this math formulation HM ei x (exp 0.05(rnd[...
[2 replies] Last: 1) random requires a range as parameter 2) You declare a double r ... (by YokoTsuno)
C++ Sleep function. Help!
 
What is wrong with this? int gamespeed = 100; Sleep(gamespeed); I launch the code and it do...
[2 replies] Last: http://www.cplusplus.com/forum/general/146833/ (by anup30)
sizeof int ,
 
hello i want to know that if check the size of int in turbo c++ then its show 2 bytes and if check...
[16 replies] Last: Once again: ONLY chars do not change. Any other type may have any othe... (by EssGeEich)
Memory usage of a C++ program with CLASS and without CLASS
 
Hi all, I developing a C++ Program to deal with huge data computation. I am using Pointers to hol...
[1 reply] : Classes themselves do not use any more or less memory than not using c... (by Disch)
About float
 
Hello everyone! I have this problem: float a = 2; a = sqrt(a); a = a * a; after the program fin...
[2 replies] Last: The square root of 2 is not a valid float; it lies between two floats,... (by Cubbi)
Sort vector of pointers to objects
 
Im creating a program for a race. The Race class has a vector of results and each element of that ve...
[9 replies] Last: Yes that solved all the problems! Thank you very much! (by ricardo46)
by kramo
Need assistance. How to square and cube a file or something
 
the problem is Write a program that reads in a text file named “my_input.txt” that contains ch...
[no replies]
by embear
help with card shuffling please!!
 
hi, im trying to shuffle a deck of cards, and it keeps coming out in order. I have no idea what i'm ...
[2 replies] Last: also int j was not being used (by jasonwynn10)
Issues
 
. For a given array, find the maximum value and the position of this maximum value in the array a...
[no replies]
Not sure what I am doing wrong here
 
#include <iostream> using namespace std; void checkLines(double slope1, double slope2) { if (...
[2 replies] Last: Please use code brackes Fixed: #include <iostream> using namespace st... (by jasonwynn10)
Pages: 1... 4950515253... 57
  Archived months: [oct2014]

Cannot post in this page. To post a new message, go to the first page.