Beginners - February 2013 (Page 46)

Recursion in an array
 
Hey I am trying to use recursion to write this function // Return the subscript of the first negative element in the array. // If no element is negative, ...
[10 replies] Last: My five cents. #include <functional> #include <iostream> namespace ... (by vlad from moscow)
by Zoq
Trouble with inputting to a file
 
I have a basic system of entering names to be randomly placed against each other. But i am having a problem with the first name. It is entering a blank for the ...
[5 replies] Last: Thanks it worked great. This took me like 2 day to try and find out on... (by Zoq)
by Alyx85
Help
 
Hey guys I'm having trouble on how to create this code for a program that displays the dimensions of a letter-size (8.5 x 11 inches) sheet of paper in millimete...
[1 reply] : Maybe this will ring a bell: size_in_mm = size_in_inches * mm_per_inc... (by MiiNiPaa)
help with this?
 
The classic toy the Magic 8 Ball make predictions about the future if you asked it a yes/no question. Write a C++ program that simulates a magic 8 ball (you nee...
[no replies]
C++ Program Problems
 
#include <iostream> //Allows input and output #include <cstdlib> //Allows use of the rand() function #include <ctime> //Allows seeding of the random number ...
[2 replies] Last: int ScoreTheDie(int n) { cout<<"What is your n value?\n"; cin >> n ... (by eraggo)
Lost in my loops
 
Basically I'm trying to make a hollow triangle I'm almost done with it but I just cannot "close" it up. My code spits this out- -------* ------*-* -----*-...
[no replies]
SDL_FreeSurface
 
Could someone please explain to me exactly what SDL_FreeSurface does? Because whenever I try to use it in anything other than the simplest of programs, it hits ...
[1 reply] : SDL uses (internally) dynamically allocated memory for storing RGB sur... (by eraggo)
by tcg
Check If File Exists, If Not Create Blank Doc - Windows
 
I've been reading quite a few threads about creating new files if one doesn't exist...but I need it specifically for windows, in the current directory we are in...
[2 replies] Last: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.... (by Lowest0ne)
by kai356
need help with my c++ hw, if else statements
 
so basically my if and else statement isn't working for me. when i try to put in "us" when it ask for my unit system, it'll skip to "press any key to continue" ...
[3 replies] Last: Can you repost your code with your changes in, and include the exact e... (by jim80y)
Help with arrays & histograms
 
Hello all, first time posting here looking for a little help. The program I have to write for my class is just about arrays and passing arrays through functions...
[no replies]
Vector Addition Calculator Help
 
Hi I am studying C++ programming and I am trying to make a Vector Addition Calculator. I get it to work for only 2 quadrants but the rest don't seem to work. He...
[3 replies] Last: I made some minor changes and now it work in quadrants 3 and 4 only. H... (by junsterfiveoh)
How do you deal with segment faults?
 
I'm trying to multiply two arrays together, but it keeps creating a segment fault. No matter what I do I can't make it go away. My program compiles, but the res...
[2 replies] Last: Hey guys, I found something a little strange. I decided to comment o... (by INeedAHero)
reading from file giving me weird numbers
 
Hello everybody. i am trying to create a function called void theaterPrices(int prices ) that reads in 15 numbers from a txt file and stores them in the array ...
[no replies]
Need help with SIMPLE program for my class
 
I'm just now learning C++, and this simple program is driving me nuts! It's a program that prompts the user to enter the radius of a circle and outputs the area...
[3 replies] Last: Thanks guys, I got it done. This site is very helpful! (by jakeford)
Kaspersky detects my program as a virus?!
 
Every time I try to debug my program in Visual C++ 2010 Express I get a message from Kaspersky saying that it detected that my program had HackTool.Win32.Agent....
[no replies]
NEED HELP for my first C++ homework
 
I need to write a programme which continuously requests a grade to be entered. If the grade is less than 0, cout that "this is an invalid grade". Or else the gr...
[5 replies] Last: Here are some examples of averaging a grade: #include <cstdio> #inc... (by greenleaf800073)
Creating String from Char & Int
 
Hello, I have been working on a program that outputs various chars and ints, but I need a way to put them together into a string For example if I had: char a...
[no replies]
I cannot understand the errror codes
 
I am doing a project that validates the date that is inputed. I have most of the project done. Accounting for leap year, the difference in length from month to ...
[1 reply] : Next time, put your code in code tags like this: <insert code here> ... (by closed account L1AkoG1T)
How to make sieve of eratosthenes more efficient?
 
My implementation was this: const long long primesupto=20000000; vector<int> primesarr(primesupto); ofstream primesout("primes.txt"); for (int load=...
[1 reply] : If you want a specific prime then you should use a direct approach lik... (by Veltas)
by ka4aka
Please help is very important and its for tomorrow!!!
 
Task: Code Assignment Provide the definitions for the following class declaration and then write a program that demonstrates usage of each member function usin...
[no replies]
February 2013 Pages: 1... 4445464748... 67
  Archived months: [jan2013] [mar2013]

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