General C++ Programming - November 2012 (Page 15)

simply a pain
 
Hi, I was so excited I had this figured out. NOPE! Here we go should be simple. // Loop to set location of index for( int i = 0; i < size; i++) { if( tel...
[16 replies] Last: Thanks Darkmaster. (by jlillie89)
Linux Command Line Compilation
 
Hi, I am create a basic framework for the project I am going to be working on. My question is simply how to include header files not in the directory you are co...
[2 replies] Last: I don't think so because the path I pass to the compiler goes to the i... (by martianxx)
*pointer issue
 
Hi, I have following issue, I have pointer object as member variable and I want to return just an object from one function. do I need to rewrite the function o...
[5 replies] Last: If you return an actual object, then you are creating a copy of the ob... (by MikeyBoy)
SDL Sound Help Please
 
Hi guys, I am working on a 2D side scroller game and came upon a sound issue. I would like to be able to play multiple sounds simultaneously but am unable to...
[5 replies] Last: Make sure that your shooting sound is loaded correctly. Mix_Chunk* sh... (by Peter87)
HELP!! Video Coding in C++
 
Folks I need your urgent help. I am working on a project and I need to read Video files and play them. I need to do this in Turbo C++. Is this possible? Can som...
[10 replies] Last: You might need to learn how to use libraries first. If this isn't some... (by Moschops)
by fil
Derived class and operators
 
Hi all, I have the following problem: I need to define the operator+() in the base class and the operator^(const derived &) in the derived class. The code is ...
[1 reply] : The compiler is saying that there is no operator^ that takes a base<do... (by Cubbi)
Trimming a string after space
 
Hey all! I need some quick help. I need to trim all the remaining characters of a string after a space is found. basically something like this: if s = "how ...
[5 replies] Last: @award982 if s = " how are you doing?" that there would only be " Ho... (by vlad from moscow)
by Imad0
I need help me wid my final assignment..pleezzz
 
can anybody help me wid my final assignment,, I have to submit it in two weeks, please need some help.. – QUESTION a)Write a program that allows the us...
[1 reply] : it's your homework, so post the code you have so far and please use co... (by Darkmaster)
by Bugsy6
Issue with while loop in SDL
 
Hi there, I'm in the progress of building a tic tac toe game. I have the game fully working up to the point of finishing. When a player wins an images pop...
[12 replies] Last: I've cracked it!! I added a variable that changed number depending on... (by Bugsy6)
How to delete (1,2)
 
How would I delete and element from an array. I have a structure that has all the info for the telephone directory. First name, Last name , zip , address.... I'...
[20 replies] Last: kind of :) thx (by jlillie89)
c++ help urgently needed
 
Write a C++ program to find the second smallest number and its position in an integer array. (Note, the length of an array and elements in the array should be d...
[7 replies] Last: Hello richcohen,can you give a try for below code: #include<stdio.h... (by tgiec)
Help?
 
#include <iostream> #include <cstdlib> using namespace std; int randomnumbersarray ; int sort_array(); int main() {int sort_array(int* nums); int n...
[2 replies] Last: move int sort_array(int* nums) (and the code belonging to it) outsid... (by coder777)
fstream
 
I'm trying to read in various values and the fstream object is giving me garbage values, but for only certain fields. ifstream readfriends; readfriends.open(...
[4 replies] Last: Copy-paste your add_user() and add_friend() functions. I can't se... (by Catfish2)
C++ doesn't accept vector
 
I've tried including the vector into the class. But it seems C++ "structures" don't support the advanced variable definition such as "vector". The compiler say...
[2 replies] Last: Oh so thanks! I forgot "using namespace std"... Silly... (by Imadatobanisa)
do while loop error
 
First off here's the program #include <iostream> using namespace std; int main() { int answer; cin>>answer; if(cin.fail()) { ...
[5 replies] Last: I really don't know why. I just knew that the input stream had to be f... (by CallMeCrazy)
argc, argv[]
 
I'm just curious about this. Is it possible to use int argc, char* argv as the parameters for multiple functions? Say, an int main(int argc, char* argv ) a...
[4 replies] Last: do you mean that the extra 1-5 arguments are read from the file? if so... (by theranga)
by aj3423
extending std::basic_string::append
 
Hi, I'm trying to design a buffer class, which contains a block of unsigned char. The std::basic_string<unsigned char> seems exactly what I need, but here's ...
[11 replies] Last: std::basic_string is not polymorphic, you're not supposed to derive fr... (by Cubbi)
by mydzyy
Reference of vector as an argument
 
Hi, expert I have a problem about reference of vector as an argument. I defined one function, like: fun(const std::vector<int>& Integers) this funct...
[no replies]
Parsing a midi file
 
I'm trying to make a program to open a midi file and save the hex data in a separate file. Can't figure it out though.
[4 replies] Last: What type of midi file are you talking about? An SMF file? (Standard ... (by andywestken)
sort an array using a function
 
Please help! i have an assignment due for tomorrow. This is what i have been asked to do, 1) Creates an array containing 100 random double numbers in the [0,...
[5 replies] Last: could be, its a big enough lecture! do you have any advice?? the error... (by Cathy123456)
November 2012 Pages: 1... 1314151617... 51
  Archived months: [oct2012] [dec2012]

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