General C++ Programming - July 2009 (Page 7)

by Ljuba
finding minimal sum in array greater than given constraint
 
Hi all. I have problem finding minimal sum in a given array of elements that is greater than given value. for example: void main() { double array = {5.8...
[2 replies] Last: here's the code #include "stdafx.h" #include <iostream> using ... (by Ljuba)
by romasi
Using THIS pointer with default argument (1,2)
 
Is there a way to set the default value for a class's member function parameter as such: class String { public: // Constructors... // Fo...
[26 replies] Last: If I thought people would confuse member variables and member funct... (by romasi)
Reading 16bit variables in x64 systems...
 
Alright, I am reading some data from an old DOS file into a buffer in memory. However, the variables in DOS and XP x64 are different sizes and I am not sure ho...
[7 replies] Last: There was actually a fairly easy answer all along that was overlooked.... (by Sephiroth)
I'm struggling trying to complete the rest of my C++ program
 
Code: http://pastebin.com/m3e26ab95 The program lets the user be the customer, banker, or supervisor, and all of their privileges involve structs. I made an ...
[3 replies] Last: Here's an example that writes the file. Give the read a try. #i... (by kbw)
by jmc
good way to capture calls
 
Does anyone know a good way to capture calls? The target OS is Windows >= 2000 32 bit. But solutions covering other operating systems would be very welcome! I...
[6 replies] Last: Wow, thank you! As far as I can see there is no solution in this proj... (by jmc)
out_of_range at memory location errors
 
I am working on a school project and have it figured out - almost. note: I do not want someone to write a program for me, I am in school to learn this, not ...
[2 replies] Last: worked like a charm. thank you very much, I never even thought to c... (by gjmiller)
How to start
 
I don't have programming knowledge. How to start learning c++
[1 reply] : http://www.cplusplus.com/doc/tutorial/ (by Oromis)
How cpu architecture affects compiling programs?
 
Can i compile a program on an intel cpu and run it on an AMD processor? Why can't simple console programs that have been compiled on windows be run on linux; a...
[5 replies] Last: Thanks. (by arun1390)
getch() source?
 
Ok, Heres the deal, I am in need of the getch() source for rewriting it as a template. I will not go into details of the purpose of this code rewrite for it is ...
[3 replies] Last: >Helios 1. It's not, I need(ed) it for an experimental function of ... (by Seraphimsan)
makefiles
 
I am trying to learn how to use makefiles and decided to start off with a simple program. I load 0-19 into a vector and the print out each element of the vecto...
[2 replies] Last: Thank you, it is working now. I have another question though. When t... (by smilodon)
Computer science chick needs local variable
 
My teacher gave me an assignment to make a cooties program * rollDice which rolls the dice and returns a value * applyRoll which takes the roll a...
[5 replies] Last: you could define the globals in a namespace: namespace globals { ... (by smilodon)
C++ Counting vowels problem
 
Hello everyone. I seem to be having a problem with my coding. I need to write a program that reads a text file and counts the number of vowels, and lists th...
[10 replies] Last: Thank you for all of your help Duoas, I've got my program to work p... (by ViperVenom)
by Jaymie
Getting and Setting Variables
 
In the .NET Framework it is possible to use variables as functions; in the sense that when you call the variable is performs a function and when you set a varia...
[4 replies] Last: Yeah, I did think of that but I was hoping I wouldn't have to use that... (by Jaymie)
by Jaymie
How does 'cout' & 'cin' use multiple operators?
 
The class operators of 'std::cout' and 'std::cin' can use multiple operators; for example: std::cout << "3 + 2 = " << 5 '"3 + 2 = "' is a string type an...
[4 replies] Last: Oh - I get it now! Thank you for both of yours' help - it seems so s... (by Jaymie)
PROBLEM: paper rock scissors
 
I've copy/pasted my work-in-progress code below for the game ROCK PAPER SCISSORS. objective: user inputs R (rock), P (paper), S (scissors) or Q (quit. ...
[3 replies] Last: Put the constants near the top of your program and make them global so... (by jsmith)
by jolly
HTMLParser
 
HI everyone, Does anyone know how to parse html in VC++ 6?I only need a simple parser, able to strip off all tags and ignore scripts. Thanks in advance. ...
[2 replies] Last: Simply use COM interfaces (complete samples in SDK to parse URL or HTM... (by george135)
by romasi
Repetitive Code within Multiple Functions
 
Is it better to place all repetitive code used by multiple functions into its own separate function? For example, in a string class you would have the constru...
[5 replies] Last: Ok thanks, I know about strlen() but am attempting to not rely on othe... (by romasi)
by unnati
how to take complement of an 8 bit number?
 
Hi all i have a program in which i need to take complements of 8 bit numbers so if byte1 = 1 then ~byte1 = 0 But the problem is byte1 = 00000001 so when...
[1 reply] : In two's complement arithmetic, -x=~x+1. Really, you should have noti... (by helios)
Problem on c++ style
 
Hi all,I have written a program in c++ using visual studio 2008.I've create only one source file and written all the codes including header files within .cpp e...
[2 replies] Last: Hi vmheric,this link is really very useful thanks for your concern abo... (by sdmahapatra)
July 2009 Pages: 1... 56789... 14
  Archived months: [jun2009] [aug2009]

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