General C++ Programming - August 2012 (Page 3)

Creating a Key Logger
 
I know this title will immediately get the attention of admins and such but I would really really really like to assure everyone that the intentions of this are...
[11 replies] Last: @ModShop, I wish that was a real link :( (by ResidentBiscuit)
by Penx
Bubblesort error
 
I have some homework where I have to use Bubblesort to arrange 500 randomly generated numbers. (In code only 10 until it works). But on line 55 I am getting an ...
[6 replies] Last: You should take a look at comb sort, lots of fun to be had with comb s... (by Zephilinox)
Two questions about input
 
My first question relates to the endl manipulator, which writes a newline character to the output and flushes the buffer . What does flushing the buffer mea...
[6 replies] Last: Okay, I understand, thanks. (by Flurite)
Declare pointers to strings
 
Hi, I'm a first year programmer in college and I'm in progress on a worksheet for my data structure class. The question says to declare a pointer variable calle...
[3 replies] Last: That is precisely the right response (by Script Coder)
How do I replace a word from a .txt file?
 
I'm trying to make a program that will find a certain word from a text file, then replace that word with something else. Currently, I'm outputting the result in...
[3 replies] Last: #include <string> std::string replace_substrings( std::string str, ... (by JLBorges)
WMI and Variables
 
I am struggling to find an answer to this one and i am wondering if any of you can help me: When accessing WMI in C++ you would normally go something like this...
[1 reply] : #include <iostream> #include <string> #include <windows.h> int main(... (by JLBorges)
Pointer in c/C++
 
Hi to everyone, I have very basic doubt in Pointer. I have declared a variable like this int **value; Book Definition: value = &anotherp...
[1 reply] : Your example contains an error. It is not obligatory that sizeof( int ... (by vlad from moscow)
by vw4x4
advantages of short data type
 
what are the advantages of short over int.is there any?
[2 replies] Last: It's usually smaller than int Basically I think that also depends on... (by eypros)
by Ikaros
unresolved overloaded function type - problem
 
Hi. I try to find maximum element of a vector. But I get error message: cplxOp.cpp:18:52: error: no matching function for call to ‘max_element(std::vector<Fr...
[3 replies] Last: Thank you very much. Sorry, that static_cast<bool(*)(CvPoint&,CvPoint... (by Ikaros)
password help
 
can you help me debug this? void logo(); void program_start(); void main_menu(); struct patient { char username ; char password ; ch...
[2 replies] Last: placement of getch is wrong in my openion (by adi29raj)
by lmd141
Unhandled exception
 
Hi there, I'm fairly new to this C++ thing so I hope you can help. I'm writing a program that prints out the coordinates of atoms in a simulation box (30x30x...
[7 replies] Last: Yeh, I wasn't calling RanGen.Random() inside the loop, which meant it ... (by lmd141)
may i know what is wrong with this code?
 
void bejeweled::loadGame(int& score, int& LIFE){ reallocateMemory(); char temp; int num, num2; ifstream outfile; outfile.open("board.t...
[4 replies] Last: ic, i understand now, thanks :) (by denniscpp)
Surface Normal Calculation
 
After looking around this code should be able to calculate the normals for triangles/quads however I seem to be getting the wrong answer. (As I am getting 4 whi...
[13 replies] Last: I have a feeling the math part of it is going to hurt me more than any... (by Hippogriff)
by aeon9
[HELP] MACHINE PROBLEMS
 
https://docs.google.com/file/d/0B4bx6l0uds9UeTlPM0o4blhTSzg/edit
[1 reply] : Is this just homework? (by kbw)
by Cearl
structures
 
Question, yeah, it's me again. Is there any way to add structures together? for example, i have; struct town { int wood; int stone; int ...
[1 reply] : No that is not possible (short of manually assigning individual elemen... (by Disch)
by Ikaros
Problems with header files and complex numbers
 
Hi, I need to implement a numerical algorithm using complex numbers. But, I haven't get that working yet, because I have problems with header files. (I haven't ...
[4 replies] Last: Thank you for both of you. Problem solved and my code is working. (by Ikaros)
Vtable Mechaanisam
 
I never actually thought how it worked. It is actually quite amazing. Thanks for the educational link.
[2 replies] Last: For each class having virtual functions,one Vtable is created.class vi... (by admin1982)
C++ - Dynamic memory allocation and class composition
 
Hello! Lately I have wondered how should a composition be implemented when it comes to adding objects within an object. Here's a simple piece of code to demo...
[3 replies] Last: And here's a little fix (should be correct now): No, you're allocati... (by Athar)
DInamic Arrays
 
Hi everyone!!! I'm writing code which has an array and i have to decrement it while ANY of it's elements is > 0. I'm doing it using following code: i...
[3 replies] Last: Because I I don't know the size of n after the array would be increme... (by Moschops)
Merging multiple files
 
Hi. How to merge multiple files into one. something like zipping but with no compression. Thanks
[10 replies] Last: It's probably a programming assignment, and so can't use an existing s... (by kbw)
August 2012 Pages: 12345... 31
  Archived months: [jul2012] [sep2012]

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