General C++ Programming - October 2012 (Page 9)

defining 1D and 2D vectors and sending floats to them
 
How can i define a 1D and 2D vector and then send them floats?
[6 replies] Last: use at() function or simply do this with s as like arrays. (by majidkamali1370)
Problem with Text Files
 
Hi all. I am having some trouble with figuring out how to do something on my program. I am to create a program to read a certain file, and give its average. I ...
[2 replies] Last: Another option would be to open the file before you start your calcula... (by jlb)
Reading a data file with int16 short
 
I am trying translate a code from Matlab into C++. I am stuck at the most basic of steps: loading in a data file of int16. I know how to do it Matlab (its jus...
[3 replies] Last: Everything I do is a learning curve. You get used to always learning b... (by Duthomhas)
compiler
 
are there any free good compilers for c++ program for students. or is there any websites. can i write codes in editors
[1 reply] : You can download free MS VC++ 2012 Express Edition. Also you can use o... (by vlad from moscow)
structures
 
what does structures do in programming and how does it helps us struct database { int id_number; int age; float salary; }; int main() { data...
[1 reply] : http://www.cplusplus.com/forum/articles/40179/ (by cire)
pascal triangle
 
Write a program to compute the value of a given position in Pascal's Triangle (See image). The way to compute any given position's value is to add up the num...
[no replies]
challenge is my game
 
Write a program that, when run, will print out its source code. This source code, in turn, should compile and print out itself. (Fun fact: a program that prints...
[no replies]
array challenge
 
Array Sum Challenge In this challenge, given an array of integers, the goal is to efficiently find the subarray that has the greatest value when all of its e...
[no replies]
Help with Triangles please
 
Hi I am new to C++. There are two problems I am having an issue solving. The first one is : Design a date structure to store the triangle of numbers. Ea...
[no replies]
guess
 
The following program will act as a guessing game in which the user has eight tries to guess a randomly generated number. The program will tell the user each ti...
[no replies]
HOW DO I START GAME PROGRAMMING
 
Hi everyone, I need some advise. I've been studying C++ for almost 18 months now and I've just completed my Data Structures course. I'm interested in learning g...
[12 replies] Last: SFML is extremely easy to learn and use. written in C++ in an OO manne... (by majidkamali1370)
question
 
Which of the following statement is correct? A. C++ enables to define functions that take constants as an argument. B. We cannot change the argument of the ...
[1 reply] : C is correct (by majidkamali1370)
problem
 
#include<iostream.h> long FactFinder(long = 5); int main() i keep getting problem. i dont know what is the problem { for(int i = 0, i<= 0, i++){ ...
[no replies]
C++ hard topic for me
 
I am new to this C++ language. This is my first time here. i just need help for the problem pasted below. i will gladly accept any suggestions or code example p...
[6 replies] Last: OP for ref: I am new to this C++ language. This is my first time he... (by Moschops)
what does this code do
 
what does this code do and i want to know why using the % sysmbol is appropritate here. thank you for helping int fib = {0,1,1}; for(int i=2; i<=n; i++) { ...
[2 replies] Last: OP for ref: what does this code do and i want to know why using the ... (by Moschops)
by Kart
Standard
 
Hi I have seen the advanced advisers on the forum quoting references to sections in a Standard when assisting members. Is this Standard being refereed to o...
[2 replies] Last: Thanks Moschops-very much appreciated... I guess another bedtime story... (by Kart)
Searching a string of numbers
 
I have a vector that holds a bunch of numbers for objects. But say you got the numbers "2, 3, 4, 6", and say when I used the function to create them, I created ...
[13 replies] Last: Alright, cheers. (by Callum5042)
Input a file and output some data
 
Hello everyone, I got an assignment that i have to use the code to input a file (which can be .txt or anything, and there are some data in .txt).I have to enter...
[1 reply] : if (myReadFile.is_open()) { while(!myReadFile.eof(... (by SamuelAdams)
How to declare Class name from another variable
 
I want to do something like this, void create_database(string A,string filename) { Database A; . . . Any idea how can i do something like this?...
[9 replies] Last: ok, i understand now, thank you. (by unkn00wn)
by BandK
How to update Array?
 
This is what i want...Picture is on link... Please help :( http://www.freeimagehosting.net/8puoq And this is my code.... #include <fstream> #include <...
[no replies]
October 2012 Pages: 1... 7891011... 50
  Archived months: [sep2012] [nov2012]

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