General C++ Programming (Page 3)

Returning a dynamically allocated array from a function
This a very simple program I created because I dont understand how do this. My goal is to be able t...
[1 reply] : I'd recommend using std::string, it'll make your life much much easier... (by myesolar)
by joe7
cross-platform issues
I'm rewriting an old Win32 painting program to support more platforms using FLTK. So far so good on ...
[2 replies] Last: It helps a lot, thanks. (by joe7)
using two differenct classes
#include <iostream> using namespace std; #include "car.h" #include "truck.h" int main(){ ...
[12 replies] Last: This is where putting the body of the function into the header file fa... (by myesolar)
static vs ordinary variables
Is it more expensive to use too many static variables instead of ordinary variables? If yes, then h...
[7 replies] Last: got it, thanks all O' ya (by danicpp)
by mushyz
Problem with code
I am trying to generate a random number between two numbers that the user gives me. I can't figure ...
[3 replies] Last: const variables need to be initialized when they're declared and they ... (by wildblue)
Functions does not return new value..
New to this site! In my program below, in the getage and get level functions, if an incorrect input...
[7 replies] Last: redo the whole process? No. Just add a loop, which is straight-fo... (by AbstractionAnon)
Hey I am trying to generate some lists of permutations of ints but I can't make std::next_permutati...
[5 replies] Last: @frankellis: google "powerset", and then "algorithm to generate the po... (by JLBorges)
C++ on OS X vs Windows
I am beginner in C++. I have a Macbook Pro and a stationary PC with Windows 7 on it. My question ...
[2 replies] Last: I program on a macbook pro. I am almost exactly like tiny screaming y... (by programmerdog)
by zxrp
Function to find sum of certain word in text file:
Hi everyone, I've written a function that has to receive a word as parameter, and then has to find t...
[1 reply] : if (temp ==wrd ) You're comparing characterrs, not strings. And that... (by kbw)
by zxrp
Problem finding words in text file
Hi everyone, I was given a task where we were instructed to find words in a text file via functions ...
[2 replies] Last: Thank you, clearing the error flag fixed the second function. However... (by zxrp)
finding maximum value in a map
Hi. Suppose that a map is defined thus: map<sttring, int> mymap; I wanna find k maximum value...
[1 reply] : You can follow this approach if k is very small with respect to N (the... (by abhishekm71)
my property problems
i did these class property: /*properties - how use create 1 property with macro: PROPE...
[no replies]
Bakery Billing Program
So, the point of this program is to make simple billing program for a bakery. The program starts by ...
[7 replies] Last: I meant calcPrice(), but here it is: #include <iostream> #include... (by jesslich)
Reading One digit at a time
Ok, So I want to do the following, Please help me out. I want to input 150 1 digit integers, from 0...
[2 replies] Last: Thank you! (by newbie456)
game array help!
'm making a game, and currently i'm making a class to help with creating the map for the game, but w...
[2 replies] Last: The compiler doesn't know what townstartlimit will be, so you have to ... (by joe7)
by janky
help! voting program.
a) Table Q2 is a list of favourite football players in the recent World cup 2014. Write a program ...
[1 reply] : Remember String arrays and normal arrays start at 0, not 1. Your men... (by Softrix)
How can I use MySQL in C++?
I am using VS2013 and I can't find anything that I can actually use in my C++ program that will work...
[19 replies] Last: This is almost funny. error C1010: unexpected end of file while look... (by kbw)
by talya7
Printing a created file
My program is suppose to read an input file and print it contents which it does and then it is suppo...
[no replies]
Program enters if statement even though requirements aren't met
My program gets user input and compares it against an array of characters (guessLetters ) to decide ...
[2 replies] Last: Don't i feel ridiculous.....thank you very much (by ValdoIan)
by hobo
Keep the rhythm with the count
#include "stdafx.h" #include <iostream> #include <cmath> using namespace std; int _tmain(in...
[4 replies] Last: Thank you lsk & Chervil. That did the trick, gotta love the little n... (by hobo)
Pages: 12345... 44
  Archived months: [may2014]

Cannot post in this page. To post a new message, go to the first page.