General C++ Programming - April 2012 (Page 13)

Deallocating some memory
 
I'm working on an overloaded assignment operator and most of the websites I've visited to get help on doing so have mentioned I need to deallocate any memory th...
[3 replies] Last: Thanks for the replies, guys. In regards to the first answer: "then i... (by hopesfall)
Creating an App
 
I am Creating an app using Dragonfire Sdk in c++. I need some help with my code. So far this is what I have: //==============================================...
[no replies]
Help with palindrome
 
A palindrome is a word, phrase, verse, or sentence that reads the same backward or forward. For example: A man, a plan, a canal, Panama! Ask the user for a stri...
[2 replies] Last: Give this a try. #include <iostream> #include <string> #include <cct... (by Subzero030201)
by idks16
sorting numbers in a file using arrays only
 
i wrote a code that sorts up to 10 numbers the user inputs and a negative number input ends the list. how would i sort a file that has at least 1000 numbers all...
[1 reply] : Hmm.. reposting isn't as effective as just continuing in your old post... (by Vlykarye)
SDL bitmap problem
 
I have tried to follow the second Lazyfoo SDL tutorial (accessible by the following link): http://lazyfoo.net/SDL_tutorials/lesson02/index.php #i have encounte...
[3 replies] Last: I think the problem is that SDL_SetVideoMode has to be called before c... (by Peter87)
Lexical Analyzer
 
Hello all I am studying "Data structures and algorithms" these days at college. As per suggested by most senior fellows, I am thinking about proposing "lexic...
[14 replies] Last: Don't be. I personally have the habit of using 'lexer' and 'parser' ve... (by hanst99)
by idks16
sorting numbers in a file
 
i know how to sort numbers when a user inputs a constant set of numbers (example: cout<<"enter 10 numbers"; cin 10 numbers and then sorts them) but how do you s...
[4 replies] Last: If the file is too big to hold into memory, then you would need to be ... (by Vlykarye)
by atiaps
to find substring from a string
 
Hello All, I am stuck in some logic and want to write a program to do following tasks : i have three string variables to be compared to each other,a strin...
[3 replies] Last: You use find() to locate where the separators are and then substr() to... (by andywestken)
by MK1
C++ simple Program
 
Hello Some People :D , I am Modder Grand Theft Auto And I am New in C++ Programing , so Pleeease I Wanna To Knew Just How To Make A Simple Program To Open With ...
[1 reply] : http://www.cplusplus.com/doc/tutorial/files/ (by TheDestroyer)
Scope of function pointers
 
I have declared a function inside my Main.cpp and passed a pointer to the function to an object declared in MenuItem.h. If I call the function from Main it has ...
[3 replies] Last: aquaz, I understand global variables should be avoided (and I do avoid... (by odracir123)
need help with coding ,
 
example : The input of argv is declared as base if base argument is b2 how do I check that the number is in the range of 2 - 16. argument 2 must contain th...
[1 reply] : First of all, next time you post your code, please use the code tags. ... (by doug4)
by Aveant
Need Help. 2-Dimensional Array?
 
I am stuck trying to write a program that, 1. Calls a function that reads from names.txt, the names of the two other files. 2. A function that reads...
[no replies]
How do I set a minimum on my rand?
 
spot=(rand() % 6 ) +spot; What do i put so that it doesnt go below 1?
[3 replies] Last: Ty peter that worked perfectly (by maskanio)
istream: operator<< and getline
 
#include <iostream> #include <string> #include <sstream> using namespace std; int main() { istringstream stream("a\nb\nc\n"); stri...
[5 replies] Last: operator>> only removes up to what has been read. Nothing more. It do... (by Peter87)
Error : Help please
 
i am getting this error error LNK2019: unresolved external symbol "public: __thiscall selsort::~selsort(void)" (??1selsort@@QAE@XZ) referenced in function _...
[2 replies] Last: yeah i figured out that later but it was not coz of dat. there was a s... (by piyush0945)
by nkan24
Undefined Reference in Main (Using Classes)
 
Hi guys, I'm getting an "Undefined Reference Error" in my main() function: Here are my classes: class CreditAccount // The Class { public: Cred...
[16 replies] Last: I am linking the Constructor, aren't I ? No, you aren't. That's w... (by doug4)
Returning Values Form Binary Search
 
Hey everyone. I'm reading data from a file and putting that data into a vector of pointers. I'm doing a quicksort on vector, asking user for a date search, then...
[8 replies] Last: Thanks for the reply, it answered some of my questions. See before, t... (by clanmjc)
by chemy
c++ array
 
trying to make a binary code breaker where computer generates random for digits made up of 0 and 1 (ex, 1010, 1001) and now i have to guess it. and computer t...
[3 replies] Last: Well, just look at the next chapter in your books. Chance is that it w... (by Athar)
socket recv
 
im having a problem while receiving a message from a client to server. i always get extra characters. let me show that: {... send(Connect, "my msg", 6 ,...
[4 replies] Last: Thanks for the help, it works (by psynchronized)
by Jikax
static global and global
 
example: main.c: static int A; int B; int main() { A = 0; B = 0; return 0; } Whats the difference between A and B? or is static o...
[18 replies] Last: ok thnx all! I think i get it now... (by Jikax)
April 2012 Pages: 1... 1112131415... 49
  Archived months: [mar2012] [may2012]

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