Beginners - January 2013 (Page 41)

by hiepnh
Function to calculate the average of an array
 
Hello every one, i make a function to return the average value of an array in C++ as follow double getAverage(int arr ) { int sizeArr; sizeArr = sizeof...
[7 replies] Last: Just out of interest, why didn't you use: sumRange - std::accumulate ... (by closed account o3hC5Di1)
Icon
 
How do I make a custom icon for my programs? I can't figure this out :(
[5 replies] Last: http://msdn.microsoft.com/en-us/library/ms997538.aspx (by ResidentBiscuit)
help me for looping for
 
input number = 5 1 5 2 4 3 2 4 1 5 input number = 6 1 5 2 4 34 34 2 4 1 5 input number = 9 1 9 2 8 3 7 ...
[4 replies] Last: Good question. My suggested code actually outputs this: input number =... (by Chervil)
by ft95
about recursive functions
 
Hi,I had a questin about recursive functions. // string_reverse.cpp : Defines the entry point for the console application. // #include "stdafx.h" #inclu...
[10 replies] Last: You could write the function simpler void string_reverse( const char... (by vlad from moscow)
Trying to get one output from a for loop, rather than thousands
 
I've written a short program to check words entered against a list of words in a seperate text file by reading the file into an array and then comparing the wor...
[8 replies] Last: it does take a lot longer than I want already, sounds like a good way ... (by fsmpirate)
I have a problem restricting user possibility to enter a caracter while I ask him to enter number
 
I want to prevent my program from blocking. I don't know how to say this in C++ language, I will try with my words. while( (answer == character) || (answer ==...
[2 replies] Last: Any simple methods? By the way, Cubbi's help helped.... (by Isengardium)
Program Flow
 
I'm going through the tutorials (after having gone through a number of others found online - and these are great!), but have a question regarding moving between...
[4 replies] Last: That is extremely helpful. It provides me a better understanding of ho... (by wriimage)
SDL Problems
 
How
[2 replies] Last: what the (by Darkmaster)
Problem with string in C
 
Hello guys, I try to create a little game and I have a problem I can't solve. The objective is to hide a word by stars, one by letter, but when I try to sho...
[6 replies] Last: Thanks for your help, i'll try differents answers and you'are all righ... (by Philtux)
kbhit() and getch() (1,2)
 
how can i use both kbhit() and getch() for a value entered by the user? ie i check if user inputs a value and then use the same value in another condition(if).
[20 replies] Last: call display function in side if(kbhit()) section means after 87 l... (by tvrameshmc)
for loop
 
I'm trying to put a max of 10 homework grades and the user choose how many homeworks to put in this is what I have so far. #include <iostream> #include <cma...
[4 replies] Last: You need to use loop so that the user can input his/her desired homewo... (by mae956)
by mae956
arrays
 
this is the code that im trying to make and im not sure of the things that i did but the output is correct. im just confused about the last part of the program ...
[6 replies] Last: thanks for your help guys... (by mae956)
pick character from console
 
hi, i am using gotoxy() function in console to print a '*' now i want to check if there is a '*' in some "console coordinate" !! is there any way help...
[4 replies] Last: Just use an 2D array to store the coordinates of all parts of snake, o... (by PalashBansal96)
by nagma
use of array
 
Iam new to C++ programming, can any one help me please how to use array and write a simple program in C++
[3 replies] Last: check out the array tutorial: http://www.cplusplus.com/doc/tutorial/ar... (by Darkmaster)
Pause a while loop in motion.
 
I am very new to C++ and only know some basics, Me and my friend have fooled around and made a program that I actually find very useful to me. An Auto-clicking ...
[5 replies] Last: RosenShock - iseeplusplus is saying that when you post code here to us... (by newbieg)
by Hotice
Non-dynamic arrays in a class
 
I wonder why non-dynamic arrays in a class throw errors upon compilation. (Classes, why you make everything require heaps!?)
[5 replies] Last: I tried defining it in the default constructor, and when I called the... (by Disch)
by Ryusko
Duplicate entries in a vector
 
So, this is similar to the last question. I'm parsing a file into a vector, but whenever I add a new item every other entry becomes a copy of it. When I formerl...
[1 reply] : It would help to know what "Animation" is, but in general, barring any... (by Cubbi)
Some suggest about windows programming
 
There's so many methonds to programming, like general win32, MFC, CLR, I'm so afraid to remember so huge thing, though there's some common thing between them, b...
[2 replies] Last: Hi, Zereo , It's my fault I didn't make it clear what my level is. I... (by ylxin1993)
Making a C++ Diamond with a given width
 
I have written a C++ program which should make a diamond with an odd width inputted by the user. However, the problem is that it only makes the diamond increasi...
[1 reply] : try this: void calculate_output (int width) { using namespace st... (by karakale)
Cant figure out why this happens...
 
Ok so Im pretty new to programming and I've started to write a simple game in a command line tool. I have one issue that seems to be popping up: { ...
[8 replies] Last: Ok, so kinda adding on to this question. I made a new section of code:... (by deathbykidd)
January 2013 Pages: 1... 3940414243... 52
  Archived months: [dec2012] [feb2013]

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