General C++ Programming - January 2012 (Page 27)

by tenaz3
List of functions in vector
 
Hi, my problem are, I want to store an array of functions in vector and when I access some position of my array, need that function will be called. Anyone have ...
[10 replies] Last: About the parameters don't worry, because I stored in other place I'... (by ne555)
error c1004 - unexpected end-of-file
 
Hello, I have what seems to be a very common problem but after doing much research and trying to fix myself, I am unable to resolve the issue. I receive the fol...
[4 replies] Last: stdafx.h is compatible with win32. Usually it will be in your project... (by SIK)
by Balrog
Files can't see other global objects
 
In one file, I have a declaration of an object "player" in a .cpp file. When I try to run a member function of that object from another header file (being sure ...
[2 replies] Last: I assume you include correctly all needed files so I proceed to next a... (by eypros)
by game
Help in how to call txt file different string
 
Here is below the program i tried! and I couldn't call (vertex, segment, and radius). The txt file has a format: vertex 1 2 4 vertex 2 4 3 vertex 2 4 5 ve...
[4 replies] Last: Thank you very much!!! (by game)
by Vladox
Cross-platform sound library
 
I'm compiling using Digital Mars 8.42 under Windows... I'm looking for a small audio library that can play multiple sounds at the same time. (I don't need adv...
[3 replies] Last: Thanks, I'll check out bass while trying to "fix" portaudio... and i w... (by Vladox)
Only putting new lines at the end of text files.
 
I'm having a problem with putting newlines to text files. Using this example I found: #include <fstream> using namespace std; int main() { ofstream fout...
[5 replies] Last: That is very strange. Opening files in text mode (which you appear ... (by Disch)
multiple questions
 
I haven't had time to post questions for a while so i have accumulated many questions. 1)What is the advantage of auto? it either takes (I know its slight bu...
[4 replies] Last: 1) It takes me more than one second to declare an iterator to a vector... (by Galik)
Find in vector
 
Hi all, I've been trying to find part of a string in a vector. The problem being that I can only get it to work if I enter the entire string, but I need it s...
[3 replies] Last: Thanks Cubbi, that works perfectly after I added a couple of little am... (by ahoysailor)
by Fluidz
Sending Keys to Unfocused Application
 
Hey guys, I am trying to send some keys to an unfocused application and every method I am trying doesn't seem to be working. It either fails to send anyth...
[3 replies] Last: Google up UI Automation if the function that you want to trigger with ... (by webJose)
WinBGIm error: redefinition of 'int right'
 
I don't know whether it suits this forum or not but I just wanted to tell (the world) something. I recently decided to try out WinBGIm library, so I downloaded ...
[2 replies] Last: @coder777, sorry, my bad. I shall edit it ASAP. And thanks for the co... (by Pravesh Koirala)
by juosja
Subtract integer from string
 
Hi! I'm sorry if this topic is repeat. I want to subtract 4567 from this string "the number is 4567 and it's not ok" and then convert it to an int. How can i ...
[1 reply] : Break string into individual words. This is commonly called tokenizin... (by Moschops)
by arooj
Program which calculates a company's total sales for a 3-month period for each region?
 
So i need to write a program for school that displays a company's 3-month total sales for 4 different regions, North, South, West, and East. Each regions total ...
[4 replies] Last: I guess that you want to take line 24 out of the inner for loop (so mo... (by coder777)
Inserting value and printing the value (1,2)
 
Dear friends , Please could you help me to get out of this problem. I want to assign a value and print it again. but it is giving error : ...
[20 replies] Last: BABU, Use code tags and don't just copy and paste the code saying it'... (by codekiddy)
insertion operator overloading error
 
Dear friends, Please look my code and when I trying to print the values of structure "status_rsp" using insertion operator overloading but it is giving "error...
[3 replies] Last: Why would you assume that variant has members named after types it con... (by hamsterman)
using SetDlgItemInt function
 
I want to set an integer into my edit control (IDC_EDIT1). When i press left mouse button on client window, it will generate a dialog box with an edit control ...
[no replies]
by Tatipu
Reading from file [like word count but including punctuation]
 
I have to use character array to count words as well as punctuation. (not including numbers and arithmetic signs (%, +). But I only know how to read and cou...
[9 replies] Last: > Because my dad said I have to use a character array Well, I assumed... (by JLBorges)
static const int& as a class data member
 
How can I initialize a static class member which is a const int& ? I'm creating a class for drag and drop objects to be used in a game. I'd like the objects...
[4 replies] Last: Thank you all for the tips. @Cubbi. It turned out to be as you said. I... (by closed account D80DSL3A)
by Tatipu
Adding a whitespace into a character string?
 
Is that possible? Example: char Moo = "I likebananas."; and have an output of: I like bananas. How would you insert it without overwriting the chara...
[8 replies] Last: sjahf7, why are you suggesting parsing the output of the program? Re... (by LB)
by sjahf7
sort a struct based on one member's alpha? (1,2)
 
I apologize in advance for my stupidity, but I am trying to sort a data stucture in order to form a database (similar to those in cell phones) which would displ...
[23 replies] Last: thank you all (by sjahf7)
When should we use C over C++ ? (1,2)
 
Hello everyone :) What are the cases when we should use C or Assembly over C++ ? That's a simple question, we want to know the answer :) Waiting for you ...
[22 replies] Last: Although C and C++ are almost equally fast (C is slightly faster due t... (by SIK)
January 2012 Pages: 1... 2526272829... 36
  Archived months: [dec2011] [feb2012]

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