Beginners - June 2011 (Page 16)

Help with functions and arrays
 
Hi there I am currently trying to calculate an output based on an array passed into a function. However I am stuck with how to pass the array into the functi...
[no replies]
by Gene
2d arrays and Functions
 
Hi, I have this code here #include <cstdlib> #include <iostream> #include <cstdio> using namespace std; void generate_solid_earth(int x, int y, char earth, ...
[5 replies] Last: Here's a quick example of using a vector similar to how you were tryin... (by Ikaron)
Changing the background color...
 
switching the bacground color with the font color would be cool. thanks in advance (: :)
[4 replies] Last: I don't believe there's any way to make changing the console colors pl... (by Ikaron)
Beginner Posix/pthread Question (1,2)
 
Hi all, I am trying to figure out how to use pthreads for some of my work. The usage seems fairly clear from the online tutorials I have had a look at. However...
[20 replies] Last: Only if commonfunc() is not reentrant (it depends on global or static ... (by helios)
New to Pointers
 
I'm just learning to use pointers. Here is a simple code to illustrate the problem that I am having. I'm getting the following error message: error C2664: 't...
[6 replies] Last: No problem. And yeah, there are a few ways to deal with passing around... (by Ikaron)
by yost87
quick question:
 
Hello all, and thanks for the help in the past. I am working on a program from last semester and cannot get finished still. My question is: when outputti...
[1 reply] : '\n' is a newline character, or, the C++ way is to use std::endl.... (by jsmith)
by lcam2
Island of Manhattan Interest after 400 years.
 
According to the legend, the island of Manhattan was purcased from the native indian population in 1626 for 24 dollars. Assuming this money was invested in a Du...
[5 replies] Last: Unfortunately, your code is still not calculating simple interest corr... (by shacktar)
by opie
Counting underscores until a period
 
I am very new to this and need lots of help. I need to count the underscores in a sentence until the user enters a period. without using ARRAYS. I put a ...
[10 replies] Last: THANK YOU FOR YOUR HELP!!!!! AND ALL YOUR PATIENCE!!!!! I wanted to... (by opie)
Transition to C++ from VBA
 
Don't laugh as I am relatively new to all this and learning the ropes of programming. I have been learning VBA for excel over the past few months and have be...
[3 replies] Last: Haha, check out the tutorials on this page then: http://cplusplus.com/... (by ModShop)
by edjeil
i need help for car park soultion
 
// carpark.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int ar...
[2 replies] Last: you need to work on comments and use code tags first. (by NewBeeBP)
ONE INPUT TO THE NEXT REQUIRED FOR ANSWER
 
I am trying to figure out how to write a code that requires the user to enter in one input and then the code requires the user to input one additional choice. ...
[14 replies] Last: in case anyone was wondering, I figured the rest out and came up with ... (by NewBeeBP)
A question on #include<string>
 
Hello, I was just wondering, is it normal if the IDE that I am currently using, C-free 5.0 doesn't need me to put down #include<string> in order to use the...
[1 reply] : The standard doesn't define what other headers a given header includes... (by helios)
by lcam2
Golf ball
 
Hi, I need to write a program that calculates the distance of a golf ball dropped from an airplane in t seconds; The program displays the distance fallen in ea...
[3 replies] Last: Thanks, It makes now. I really appreciate your help. (by lcam2)
by Jsel
Problem with 2 class prototypes
 
The problem is that I have 2 class prototypes that need to recognize one another before they can actually be written. example.. class A { //member function p...
[2 replies] Last: Thanks I'll check that out. (by Jsel)
How do I include spaces in my Char String
 
I am new to c++ programming and I'm writing a simple program in which the user inputs a sentence and the program reads the sentence back to you, but all I can g...
[1 reply] : 1. What if the user types in more than 80 letters? Use std::string ins... (by LB)
by Luke95
"Pointer to" function type
 
How do I correctly use a pointer to function type? Im running a program thats shuffling numbers for me, and I defined my result, set the char string, set random...
[8 replies] Last: Reread Zhuge's post, he clearly explained exactly why. (by LB)
Adding commas to numbers
 
Hello everyone, I was just attempting a program from the book where it asks to write a program that readers a number greater than or equal to 1000 but output...
[2 replies] Last: Oh ok, so it is possible then to go up to a very large number. Thanks ... (by enlightenMe)
using *.get from a filestream to read integers
 
i've heard that it's possible to use isdigit to read integers from a file. however, i'm a bit lost as to what this means... myfile.txt Jason 1010101 #in...
[4 replies] Last: int my_number; cin >> my_number; This does exactly what you want for ... (by LB)
Circular includes and forward declarations
 
I'm having problems with circular dependencies here's a little example #include <iostream> using namespace std; class A { int doSomething(B bIn) { ...
[3 replies] Last: Or you could do this the right way: // a.h - give it a header gu... (by Disch)
by tonnot
The best way to write code to load/save vectors of custom classes
 
I'd want to write a fast code to load /save vectors of custom classes. Both to-from memory and to-from disk. I have (in example) struct mydata { int one...
[7 replies] Last: The problem is that that is the specialization that I use for custom t... (by ne555)
June 2011 Pages: 1... 1415161718... 41
  Archived months: [may2011] [jul2011]

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