Beginners - December 2014 (Page 22)

drawing shapes
 
how can I get the following result 1 2 3 4 5 6 7 6 5 4 3 2 1 1 2 3 4 5 6 * 6 5 4 3 2 1 1 2 3 4 5 * * * 5 4 3 2 1 1 2 3 4 * * * * * 4 3 2 1 ...
[6 replies] Last: work for the stars #include <iostream> using namespace std; int main... (by anup30)
C++ Help
 
As a project for my computer science class, I need to write a program that prompts the user to enter a positive integer. Then the program needs to display all t...
[12 replies] Last: I tried your array and it worked and I understood it after I ran it. T... (by DerpOverlord)
Regex to match 3 numbers in parentheses
 
I'm really struggling with regex in C++... do you know of a good resource where I can learn the proper syntax? Anyway, I would like something that would match ...
[2 replies] Last: Thanks so much JLBorges! (by bulba5aur)
Common C++ Uses
 
Hi, I'm new to this organization. I'm 16 years old and just started programming this summer. I'm familiar with HTML, JavaScript, CSS, and bits of MySQL and PHP,...
[3 replies] Last: Thank you for the information, it really is encouraging! (by CorvetteDude427)
Help making a program :/
 
Hi there! :D i need help (a lot of help) making a poker program that -gives out 5 cards to players
[2 replies] Last: Look into: Programming syntax. Arrays/Vectors. Functions. Variables. ... (by UglyIgloo)
Help with Overloading Unary Operators
 
Here are the details of the assignment: I am to write a program with a class Worker that has 3 private data members (int age, int yrsService, and string jobTi...
[15 replies] Last: http://www.cplusplus.com/forum/general/150964/ thats the link to my n... (by dub1987)
Counting words from text file issue
 
Hello, I'm a C++ novice and am trying to write a word-counter function that reads from a text file. My code compiles without any errors, but when I run it, t...
[4 replies] Last: why your loop runs for ever. When you open a file to read, the file... (by shadowCODE)
Converting recursive function into a loop
 
I am trying to convert a recursive function into a for loop but it is not working properly. Please advise. Thank you for your help!! //recursive functio...
[3 replies] Last: also got it to work with the for loop! int factorial(int n) { int a... (by amarthy)
First letter keeps getting cut off in my string output??
 
I can't seem to figure out why the first letter of my strings is getting cut off when it is displayed. I tried doing things like cin.ignore and cin.clear in dif...
[5 replies] Last: You're welcome :) (by deathslice)
decision making in c++
 
Using nested for loops write a program to show all prime numbers in range given by user.
[4 replies] Last: #include <iostream> using std::cout; using std::cin; using std::endl;... (by Uk Marine)
Input files and taking integers out?
 
I am trying to work on a C++ program to calculate the quadratic formula using input files and classes. I have written my class, but I am trying to find a way to...
[1 reply] : Here's a sample: std::ifstream inputfile{"input.txt"}; int a{}, b{}... (by benbalach)
by merna
How Can i move this figure
 
* ** *** **** I want to make this figure to be printed then disappear then printed again as if its moving horizontally once & vertically once & along the diagon...
[6 replies] Last: Thank you (by merna)
Adding in While loop
 
I am in the process of creating a game that has two players machine and person. The player is selected randomly each round. So if the player is selected, he nee...
[1 reply] : Theres not enough code to see what the problem is. (by CS Student)
by Kman
Passing an array to a function?
 
Hi all, new to this site. This is the assignment I need some help with: "Write a C++ program that declares an array alpha of 50 components of type double. C...
[14 replies] Last: > So I was right in that % had something to do with the output. Again... (by minomic)
"..." is not a type name
 
So, I'm getting back in the swing of coding things after a few jumps and starts, and have been following along on an OCW course on C++. The current problem I am...
[5 replies] Last: Well is the point class or PointArray class declared first? If you cou... (by giblit)
While loop not working...
 
I am in the process of creating a game that has two players machine and person. The player is selected randomly each round. So if the player is selected, he nee...
[2 replies] Last: Thanks for your reply, then my next step should be to put and if state... (by createpepemad)
After sort need specific index to print with value
 
I cantĀ“figure out how to cout when sorted which person ate most pancakes. I need som help here. #include <iostream> using namespace std; // Const...
[4 replies] Last: I think now understand what you mean. You want the numbers to correspo... (by deathslice)
Why the program is not giving output?
 
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false);cin.tie(0); int n,m,co=0; cin>>n>>m; for(int i=n; i...
[3 replies] Last: @Peter87 I've Fixed that..but still not giving output. (by abdalimran)
by Nezar
virtual table pointer
 
Hey, I know the vptr ("virtual table pointer") points to an array of vtbl ("virtual table"). the thing I can understand is that, is there only one vptr at ru...
[1 reply] : As implementation would make it. It is possible, that it will not use ... (by MiiNiPaa)
Function call
 
Hello, I`m not sure if I have called function int Search(int depth) correctly on line 167. If that`s the case, it would explain why the program behaves so st...
[4 replies] Last: Choose a move... Enter row and col : 0 2 ------ . . X . . . . . .... (by pacman169)
December 2014 Pages: 1... 2021222324... 55
  Archived months: [nov2014] [jan2015]

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