Beginners - December 2011 (Page 38)

Trouble changing the range of a vector
 
I am using a code to randomly shuffle a vector. The code I copied creates a vector with units from 1-9. I need to generate a vector with values ranging from -0....
[2 replies] Last: I modified the program to this: #include <iostream> #include <algorit... (by dman703)
Help with C++ Homework assignment
 
Okay here is the assignment: Write a C++ program to estimate the springtime count of deer in a park for 10 consecutive years. The population of any given ye...
[14 replies] Last: I don't even know how to output the numbers given through the else if ... (by fiestaforesta)
how to check whether user input is double value or not?
 
i want to give user a double value. if user give other than double value like string/alphanumeric/alphabets/some illegal values (ex:1;2), it should not accept ...
[2 replies] Last: thank you for giving reply....... i done this,but still it accepting... (by seccsuresh)
Problem reading numbers from file
 
Hello, I am trying to read some numbers from a file and outputting the numbers on the screen. But the last number in the file gets outputted twice. Here's the...
[2 replies] Last: Read here for why http://www.parashift.com/c++-faq-lite/input-output.... (by Stephan)
by sweezy
Question =(
 
INSTRUCTIONS: Given a string variable s that has already been declared, write some code that repeatedly reads a value from standard input into s until at last ...
[1 reply] : You're entering Y, y, N, n as variables. You need to enclose them with... (by benjamin d)
My Pancake Program c++
 
#include <iostream> #include <cmath> #include <string> void getArray(int tempArr , int arrSize); void printArray(int tempArr , int arrSize); int calcula...
[2 replies] Last: Just outta curiosity, how did your line 14 work? I thought C++ does no... (by Caprico)
by sweezy
C++ simple question, need help =/
 
INSTRUCTIONS:Given an int variable k that has already been declared, use a while loop to print a single line consisting of 97 asterisks. Use no variables ot...
[2 replies] Last: Apparently it wanted me to declare 0 when it told me it had already be... (by sweezy)
use strcmp in if function
 
#include<stdio.h> #include<conio.h> #include<iostream.h> #include<iomanip.h> #include<string.h> char kode ,jl ; int harga ,i; garis() { cout<<"====...
[2 replies] Last: strcmp(kode ,"AD01" kode is one char , and "AD01" is a null-termin... (by hentaiw)
array help
 
#include <cstdlib> #include <cstdio> #include <iostream> #include <cstring> using namespace std; bool BinarySearch(int a , int t) { int size ...
[7 replies] Last: See? So many answers when you post a question correctly and with the ... (by webJose)
Can't figure out what i'm doing wrong?
 
#include<iostream> #include<string> using namespace std; class RetailItem { private: char *description; int unitsOnHold; double price; public: RetailItem(cha...
[5 replies] Last: Thanks, i get what you meant now haha. All fixed :) on another note, d... (by Derekrm14)
Problem with exception/writing violation
 
Hello, I am currently taking an introductory C++ course in college and am working on the final project but have run into an error. I am using Windows 7 64-bit...
[6 replies] Last: I found the problem. The function UpdateScores compared that value to... (by ADHDguitar)
by stuted
String Converting ('strcmp')
 
I have been reading a tutorial about how to edit solitaire's memory addresses, since i am really interested in memory editing. I ran into a problem i can't fix ...
[12 replies] Last: Didn't even need to get debug privileges. It is truly horrifying to... (by Moschops)
Classes that access each other
 
I'm having some sort of forward declaration problem. I have 3 classes, A, B, C class B has pure virtual functions and class C is a child of B This is what I ...
[3 replies] Last: @Peter87 - that was it - thanks so much! @Ben - I was thinking of doi... (by RPGillespie)
Instancing an object inside a class
 
Hi! I'm trying to make an Game Engine with C++ (and learn how this language works) and I'm having a problem in use in my program body an object instanced inside...
[6 replies] Last: Oh! I get it! Thanks for your help Peter! Things are getting cleaner n... (by bruzetti)
Problem with arrays
 
#include <cstdlib> #include <cstdio> #include <iostream> #include <cstring> using namespace std; bool SearchBinary(int a, int t) { int size = s...
[1 reply] : a is an int and not an array. (by Peter87)
Repetition in loops
 
Hi, I'm trying to write a code that will provide all possible combination of the number 13, using three digits. (at this stage everything works fine) . But no...
[2 replies] Last: Thanks , it works :D (by metacan)
by ac7nj
sprinf() vs sprint_s()
 
I have some code that I wanted to upgrade for a MS 2003 to MS 2005 Visual Studio The code is quite complex but it will compile in 2005 but I have several warni...
[3 replies] Last: I'll look at std::ostringstream and std::string and see how much chan... (by ac7nj)
Hello
 
I have been doing C++ programming for like a week now and have a few questions. To start off, I am a 12 year old coder that wants to start a company. I am lead ...
[4 replies] Last: yeah. i want to make a game to test my c++ skills. (by pjquinn)
Help with C++ loops
 
Hello, I am new to C++ and have a few problems: 1) How to display a character x amount of times of which a variable is holding the amount E.G.- Number of ...
[2 replies] Last: Also, just to note out your "NOT equal to" operator is backwards, it's... (by benjamin d)
by jkvu1
TicTacToe
 
Hi, I'm trying to make a tictactoe program as a project and I can't seem to display my 2D array. Can anyone help?? Here's what I have for my class function: ...
[4 replies] Last: It worked! Thanks a lot!! You're a life-saver :D (by jkvu1)
December 2011 Pages: 1... 3637383940... 47
  Archived months: [nov2011] [jan2012]

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