General C++ Programming - August 2011 (Page 25)

by gizzmo
copy constructor
 
Hi, When I use a copy constructor for my class for which one of the data members is an array, should I first delete *_data and then allocate is with new ? ...
[1 reply] : Your class should delete whatever it allocated in this instance . ... (by Disch)
by kemnet
Fnding Class Code
 
Hello. I was wondering if/ where i could find the class code in C++ example when you drag your data source view on a form, and it lets you scroll it with the na...
[no replies]
by NGen
IDE with Constant Autocomplete
 
After working with Xcode for two weeks straight I've been spoiled in a way. I've gotten used to (and have grown to love) the autocomplete-as-you-type feature in...
[4 replies] Last: StoneHeart you're my hero, thanks for the plugin (by NGen)
error with my array
 
#include<iostream> #include<string> #include<iomanip> #include<cstdlib> using namespace std; const int max=20; class passenger { protected: char name ; cha...
[1 reply] : That makes sense: l_destination exists only in the searching() functio... (by kooth)
sieve of eratosthenes
 
I'm writing a code to calculate the sum of the primes below a given number. I've already written a brute force program that works perfectly but is slow, so I'm ...
[6 replies] Last: /* if (!sieve ) { c... (by ne555)
by dax
3D grid ray detection
 
Hi, I'm looking for some ideas for an algorithm that, very broadly, enumerates the 3D cells through which a ray passes (the cells must be in order). I have the ...
[1 reply] : If you want raycasting explained, see http://www.permadi.com/tutorial/... (by hamsterman)
What Do You Think?
 
// Copyright © 2011 GreenPoole Productions // Created By Alex, and Logan. #include <iostream> #include <windows.h> using namespace std; // ALL OF THE ...
[10 replies] Last: E.g in Java we can have interface ABC {...} syntax but we do not have... (by HenriK)
any better solution than making a list of list of lists for my problem ?
 
Hey forum :) I´m working on the following problem: I have a 2D <bool> array, where 1 means the cell is solid and 0 it is liquid, so the domain can consist of ...
[2 replies] Last: Thanks for your ideas, and you are right, I dont need so many layers. ... (by holzdolph)
can you explain this?
 
what is stuck and operation on stuck in c++ thanks
[1 reply] : .. did you mean 'stack' ? (by hamsterman)
operations on constatnt variables
 
#include<iostream> using namespace std; void fun( const int &k) { cout<<k; } int main() { const int i=10; int *p=(int*)&i; *p=15; cout<...
[2 replies] Last: I think this is what is happening, correct me if I am wrong: The 10 co... (by LB)
by mae38
Problem Calling a Virtual Function from a Multidimensional Array
 
Dear Fellow Programmers, Again, I have a little problem with nasty multidimensional arrays. I have a class, let's call it Base with a method virtual int ...
[6 replies] Last: obligatory link http://www.cplusplus.com/articles/G8hv0pDG/ (by hamsterman)
by eidge
Is there a way to set an iterator "one before" the begging?
 
//Verifying Candidates using the rest of the strings, removing those that are not present on any of untested strings. for(vector<string>::iterator cand_itr =...
[16 replies] Last: Ahah good point ;P Anyways this is going off-topic, soon enough some... (by eidge)
Creating protable .exe files from my C++ code
 
Hello, I have a VS2010 C++ project which outputs a text file. I just want to use the executable that is developed by the compiler so that I can run it on...
[8 replies] Last: Aside 1. To get the actual, localized path of the user's document f... (by andywestken)
New sematics for C++ copy assignment operataor?
 
I came across with a book in which C++ copy assignment operator of a class becomes: const X &X::operator=(const X&); Is it correct? (I never saw anything l...
[7 replies] Last: I have to say, I've never found myself in the situation where I just ... (by helios)
bibliothéque Imaibou pour amélioration graphique sur console
 
j'ai créer une bibliothèque open source qui permet de faire des améliorations graphique de la console pour le C++, voila les principales fonctionnalités: M...
[no replies]
by kemnet
Scrolling Rows in Database(forms)
 
Hello C++ X perts! im working on project where i want to write my own code to scroll a database. so im followed a tutorial. here:http://www.homeandlear...
[2 replies] Last: nouuu im working in C++ but i got that syntax from a Csharp site. but ... (by kemnet)
by JuDiNi
Upload Data to WebServer C++
 
Hi!, I am looking for libraries or better a code to upload data (.txt file) to a Webserver. This has username and password to access into the files. It is...
[2 replies] Last: "cryptlib" and "cURLpp" look very useful for that. Agile, thank you ... (by JuDiNi)
I want to make a database storage in a computer shop which does not get removed even after closing the program.
 
void entry() { clrscr(); textcolor(RED); gotoxy(32,4); cputs("CITY COMPUTERS"); gotoxy(5,8); cputs("Customer ID :"); gotoxy(5,10);...
[2 replies] Last: Actually, I think using a remote MySQL server would suffice here with ... (by closed account S6k9GNh0)
by kemnet
Scrolling Rows in Database(forms)
 
Hello C++ X perts!http://www.cplusplus.com/forum/thread.cgi?w=new&i=854 im working on project where i want to write my own code to scroll a database. so im ...
[no replies]
by Elena
OOP constructor problem
 
Hello I have the following code (here is just the "interesting" part): class A{ int x; public: A(int i=0):x(i) {} int get_x() { r...
[3 replies] Last: Thanks you very much for your replies! @dax, yes, there it was a mist... (by Elena)
August 2011 Pages: 1... 2324252627... 29
  Archived months: [jul2011] [sep2011]

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