General C++ Programming - November 2014 (Page 6)

Sorting a array to numerical order problem
 
I need to find the Mean, median, mode, and make a histogram of a 99 value array. How ever my sorting function is not sorting the array at all how can I fix this...
[8 replies] Last: I found How to do the mode. (by tmiller96)
Help understanding libespeak?
 
Hey everyone! I need to use this software for a plugin I'm writing called espeak http://espeak.sourceforge.net/ which is both a command line text to speech tool...
[no replies]
Help with an error with strings and functions
 
I'm really not too sure what I'm doing wrong as I have been following my course notes for the function itself. The function prototypes and main algorithm have ...
[4 replies] Last: Ah I see now, thank you very much all, I appreciate it very much! (by Drisc95)
C++ use linked list to sum two sparse matrix
 
Note 1: The programs should read the matrices from the *.txt files, NOT from keyboard. Use the sample codes provided on Stream. Use either the C or the C++ sty...
[2 replies] Last: Your linked list should have an imposed sort order on it (sorting on t... (by Duthomhas)
Problems with code(password masking)
 
#include<iostream.h> #include<conio.h> #include<graphics.h> #include<dos.h> #include<string.h> #include<process.h> #include<alloc.h> void main() { ...
[no replies]
try_catch
 
try { //statements //no throw statement for bad_alloc } catch (type var){ //statements //catch bad_alloc } VS ptr_var=new (noth...
[6 replies] Last: What header you need for bad_alloc: http://www.cplusplus.com/referenc... (by coder777)
How to calculate an integral by Simpson's method (Spanish code)
 
This is the code: #include "mn_simpson.h" #include <stdio.h> //************************************************************ // FUNCION PARA CALCULAR...
[no replies]
Using ASM in C++
 
Hey Everyone, I holds a good experience in C++ but nowadays doing Assembly Language. Can Any One Tell Me how Can I Use asm command in C++, or is there any oth...
[1 reply] : Inline assembly in C++ is only conditionally supported and if an imple... (by JLBorges)
by bpc123
Reading in variables from a struct (ifstream)
 
For some reason I can't read these stats into my program. Basically the beginning of this assignment is just to open two files and read in the stats into the th...
[no replies]
Swapping Elements in an Array
 
I thought I'm done doing mg activity, but my professor said that we need to use a Temporary Variable for Swapping and I have no idea where to put it. Mind givin...
[1 reply] : // swap array with array int temp = array ; array = array ; arra... (by JLBorges)
Game Server Code Problem
 
Hey guys, I am new arund here as you seen form my last post, there is going to be a lot of topics from me wanting help. If you guys could help me out that would...
[9 replies] Last: Yeah I believe it does, youj just have to link the file in another .IN... (by Camouflage)
by embear
problems with code
 
hi all, I'm trying to use derived classes to create 3d shapes and output them, this is my header file #include <iostream> #include <string> #include <ma...
[4 replies] Last: thank you, i have ran through it and tried to fix the little mistypes ... (by embear)
by davtk8
Reverse even words in a string
 
I'm trying to reverse every even word in a string (not all of it). But I keep getting an empty output. For example: The mouse was caught in peg. ...
[1 reply] : For loop is looping over the size of the string (line 11) line 15 sho... (by Smac89)
C++ Program wont function with any number larger than 100, WHY?
 
#include <stdio.h> #include <iostream> #include <cstdlib> #include <ctime> #include <cstdlib> #include <fstream> #include <cmath> using namespace std;...
[1 reply] : Ok, to be more specific. The array works just fine with 100 for size b... (by Chapelal)
Binary searching by a key containing two variables?
 
So I have an array of distinct pairs of natural numbers. That is, my array looks something like this (for instance): { (1,5) , (6,4), (5,3), (2,3), (2,4) } ...
[7 replies] Last: Thanks everyone :).. I managed to figure out a way to do this in O(log... (by sebihp2007)
by davtk8
Reverse alternating words in a string
 
I'm trying to create a small program to reverse every alternate words in a string. For example: The mouse was caught in a peg. OUTPUT: The esoum was thgauc in...
[6 replies] Last: #include<iostream> #include<string> using namespace std; int main()... (by davtk8)
by yoga79
Read data file
 
Hallo all.. I am a beginner in C++ program...I want to ask you, if i have a data,how to write the code for read this data? Can you give me an example for that....
[1 reply] : Maybe you want to have a look at http://www.cplusplus.com/reference/io... (by tcs)
by morv
Error : not declared in this scope
 
#ifndef ROAD_H_ #define ROAD_H_ #include <vector> #include <string> #include "Car.h" using namespace std; class Road{ #ifndef CAR_H #define CAR...
[2 replies] Last: You may find some more hints when looking for " forward declaration " ... (by tcs)
How to implement array-based listing and searching?
 
Background: I'm trying to open a text file from my computer and randomly output a random line of text (string) onto the console. How do I go about doing this? ...
[1 reply] : Would you please explain line 36? I think I do not really understand ... (by tcs)
Prompt the user for two characters. Output the movies that begin with those two characters.
 
i have trouble printing out the movies starting with inputing only two letters. #include <iostream> //cout, cin, endl,getline #include <fstream> //ifstream ...
[1 reply] : Could you be more specific as to what you need help with? Also, pleas... (by LB)
November 2014 Pages: 1... 45678... 32
  Archived months: [oct2014] [dec2014]

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