General C++ Programming - September 2011 (Page 12)

Borland C++ Builder v6 - Missing Form
 
Hi everyone I created a project with a single form in C++ Builder and added some source/header files. Everything resided in the same directory and worked fin...
[13 replies] Last: I found a partial solution to the problem. The original TFormMain.c... (by minime9111)
Redefinition error
 
I am getting an error and I don't know how to fix it. Statistics.cpp:106:1: error: redefinition of ‘Statistics::Statistics(int*, int)’
[3 replies] Last: No, you didn't remove the definition in the header file. It's still th... (by hanst99)
by bobsun
cplusplus.com C library reference download
 
Hi, I would like to ask about cplusplus.com C library reference download. Comparing with MSDN, it is simpler and more direct; comparing with the 1000 page...
[5 replies] Last: This is wonderful. Between PDF and .chm, .chm seems better due to its ... (by bobsun)
by Srija
Problem In for Loop
 
#include<iostream> using namespace std; int main() { int mul,res=0,k,j; for(int i=1;i<5;i++) { for(j=1;j<5;j++) { mul=i*j; co...
[3 replies] Last: according to me only according to you though. "iostream.h" is wr... (by hanst99)
Dynamic Memory
 
I have been reading a book and it is talking about the efficiency in using dynamic memory allocation because memory can be used and freed up as needed. When you...
[5 replies] Last: Thank you everyone for the explanations. I knew there had to be a logi... (by ddwinters45)
by lab3
Sorting and carrying along all the information
 
Hi, I'm wondering why this piece of code isn't sorting and this is the same algorithm i've used before to sort a string of arrays. It runs and compiles but afte...
[5 replies] Last: You should find something better than a bubble sort. In any case, to ... (by Duthomhas)
by micmic
ideas for multiple sorting/copying of arrays
 
Hello, I'm working on a project which involves manipulating a two-dimensional array. Please bear with me while I explain the purpose of the program. Assume t...
[2 replies] Last: Thanks, this makes sense because it doesn't involve any array copying.... (by micmic)
Problems with delete []
 
Hi you all, I have a big structure data made by nested arrays and one of them is dynamic. struct int array int array int ...
[4 replies] Last: Well I am not terribly psychic, but rest assured, if you implemented y... (by Galik)
reading from a file and storing in array
 
The following is in the input file: James John 5.50 Gave Alber 456.67 Hope Jone 89.43 Napa Paris 3943.90 After i have open the input file how would i ...
[2 replies] Last: You've already asked this same question here: http://cplusplus.com/for... (by keineahnung)
problem in handling extended characters
 
I am recompiling some old code. got a problem in handling some special characters.got a compilation error: error C2001:newline in constant the code looks like ...
[3 replies] Last: it is related to the OS setting. in Windows, my region and language wa... (by henry1999sg)
runt-time error: strcpy string literal
 
I located a bug leading to runt-time error in my program that did sth. as follows: char *pchar; strcpy(pchar, "Class"); Can someone explain why? The ...
[2 replies] Last: Thanks, Disch. Your explanation makes it clear to me now. (by Robertlzw)
C++ What is the point (practical use) of Patricia Trie?
 
I am not clear on the whole purpose of a trie. Is it a compression mechanism for highly repetitive data where redundant strings are removed? Is it a data storag...
[2 replies] Last: Thanks, Azagaros. (by grigorianvlad)
Memory storage
 
int A=1; we all know that "1" is stored in somewhere in the memory, which will take the space of a int type. And we all know, when we are using variable...
[10 replies] Last: Well, if OP read our little chat he can draw his own conclusion. Going... (by Caligulaminus)
no matching function for call to ‘Mode::Mode()’
 
I am getting an error when I try to run my mode median mean program. What is causing this error. Mode.h:41:29: error: no matching function for call to ‘Mode:...
[2 replies] Last: class Mode { protected: int *b;//Sorted Array int bSize;//S... (by Azagaros)
Catching bad input
 
int x; cin >> x; Is there any way to detect that the user entered an non numeric value. Seems if I feed cin "Hello" it assigns 0 to x; I was expecting...
[3 replies] Last: Thanks that worked. (by YellowDog)
problem returning pointer from a function
 
I have something like this... int main(void) { char* name = getName(); cout << "Hello " << name; return 0; } char* getName(void) { ch...
[8 replies] Last: Yes. free works with malloc. delete works with new . new -> de... (by Disch)
Looking for an open-source programming community
 
Well as you saw, I'm looking for a programming community. I would like to get into some video game C++ open source kinda stuff but I'm not sure where to start. ...
[4 replies] Last: You could take a look here: http://sourceforge.net/ (by Galik)
C++ Time
 
i want to get current time but it returns seconds from 1/1/1970. Is there any additional function or method
[2 replies] Last: If your problem is how to convert it in a string showing current date ... (by maximilianus)
linked list of structure
 
The following is in the input file: ucture.
[3 replies] Last: First of all - is this a C or is this a C++ programming course? If it'... (by hanst99)
error: expected unqualified-id before '[' help?
 
So I'm getting an expected unqualified-id error in the code below. It's a file being called by the main in another file. They are compiled together using g++....
[2 replies] Last: You can't return arrays from functions. You'll either have to pass ... (by Disch)
September 2011 Pages: 1... 1011121314... 31
  Archived months: [aug2011] [oct2011]

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