General C++ Programming - November 2011 (Page 46)

Console Help.
 
I am making a console program, that displays multiple bits of information on multiple rows and columns. I want to not have the terminal make more lines to give ...
[18 replies] Last: Everyone does. A function prototype tells the computer what a funct... (by Duthomhas)
C++ reading from file problem
 
Hi, basically I have to compile a program that reads from a .txt file and then performs certain task. My problem now is that my .txt file contains many lines wi...
[6 replies] Last: To be complete: Extracts characters from the input sequence and st... (by kooth)
Output file values in two different arrays?
 
How do I go about putting the values below into an angleArray (left column numbers), and a liftArray (right column numbers). integers1.txt -4 -0.182 -2 -0...
[2 replies] Last: Works like a charm. Thank you!!! (by kraigballa)
C++ Template question
 
struct Base { template <class T=Base> struct Type { template <class Extender> struct ExtendHelper { template <class U=ExtendHelper> str...
[1 reply] : struct Base { template <class T=Base> struct Type { template <cl... (by Syuf)
by Tatipu
How do you declare this line(s) of code?
 
void initialize(invType& inv){ createItem (inv.item , "10300", "Nutella", "Ferrero", 10); createItem (inv.item , "10475", "Almonds", "Members Mark", 27);...
[4 replies] Last: Yeah, I feel the same way sometimes. (by Tatipu)
Data Structures programming
 
I'm a little stuck on my programming.This is a list of the errors that I keep getting: ke\quake\quack.cpp(13): error C2440: '=' : cannot convert from 'Quack::i...
[10 replies] Last: Your code is still practically unreadable because of the lack of inden... (by closed account 1yR4jE8b)
Memory Leak Check
 
Just want to make sure this isn't producing a memory leak. I think I dropped it with the delete *it; in CMenu::menu() void CMenu::newLoan(){ int sel; ...
[7 replies] Last: $ valgrind ./a.out ==25978== ==25978== HEAP SUMMARY: ==25978== ... (by ciphermagi)
Few questions
 
After a while(2~3 of active development) I managed to "finish" the program named 'Graduation' from /articles/N6vU7k9E/,(hooray) but I'm not sure if its working ...
[no replies]
find() returns -1?
 
I am using string::find() in the syntax that int t; int pos = 4; //some number string somestring(somechar); t = somestring.find("1", pos); //whatever is...
[4 replies] Last: @helios It's all right what you said, but you stuck for an satisfying ... (by mtrenkmann)
How to add commas to a number...
 
Ok I have yet another dilemma... I dont know how to add commas to an unknown number, (eg. If the user entered 12000 i need it to cout as 12,000) I have it in...
[4 replies] Last: ^ You're right but maybe the brandonjconnor wants to add a comma to hi... (by CosminNTG)
std::sort... problems to use this funtion
 
Dear all, I have a huge problem by trying to use this funtion. I called this funtion from my main: /* Generate random initial population */ vecto...
[2 replies] Last: Thank you very much... It compiles and also run right now without a pr... (by MCJamaica)
Can Anyone Help me on This.
 
build a tree as the following and display the results of by using depth-first search, and breadth-first search. A =B= ...
[4 replies] Last: hey that's nice-you got a chance to reply so early and thanks a lot..i... (by syedasrarali)
Multiple .cpp Files
 
I should probably know this, but I can't remember how to make a call to a seperate .cpp file. Anyone care to fill me in?
[2 replies] Last: You should use a syntax like: #include "myheader.h" in your main.cp... (by eypros)
closing program without message
 
Is there a way to close your program with a code that doesnt give a message back? or that you dont need to press a button to close it?
[1 reply] : A program finishes when execution reaches the last line of code in a c... (by webJose)
Dynamic memory for Objects
 
For a program that I am writing to analyze soccer data, I have a constructor for a class that takes a filename and constructs the class from everything in that ...
[1 reply] : Where is it in memory? On the heap. i don't know anything about usi... (by helios)
by Aquila
What makes the increment and decrement operator so different
 
Hi all, A C++ newbie here. As a beginner, I like to play around with different syntax of the language and sometimes I'm faced with situations, such as the on...
[3 replies] Last: Thanks LBEaston and thanks to Disch, too, for your explanation. (by Aquila)
Need help, can not get function to return
 
I am trying to get number from a file and use the quad formula to get the positive value and the negative value. I think I need to pass them by reference but I ...
[1 reply] : @ajc5520 To get rid of 1>v:\compsci\homework4\homework4\homework4\ho... (by whitenite1)
HELP ... hex to decimal conversion
 
//hex to decimal and bianary char hex; const string myHexString = hex; char *line = "short line for testing"; long strtol( const char *nptr, cha...
[7 replies] Last: Are you not over complicating it or am i missing the point? 1) enter a... (by buffbill)
by mdoors
buckets ADT
 
So i have to code a program that creates a series of "buckets" that holds the color pebble red, blue, or white. I did some poking around on here and found a si...
[no replies]
can you help me with errors in a class Garage program?
 
This is my program: /* // A-1-1-01 Author: Andrya Newman ...
[2 replies] Last: customerNumber++) { ... (by andywassup)
November 2011 Pages: 1... 44454647
  Archived months: [oct2011] [dec2011]

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