General C++ Programming - March 2015 (Page 11)

I need Help With My Class
 
I have created A class Program With C++ But I don't Know Why This outputs strange numbers like -858993460 And This Is The Program : #include<iostr...
[1 reply] : void setc(int a, int b) { a=r; b=im; } The variable on the left is ... (by Ganado)
Text File
 
hello guys there are so many guides how to work with text files but lets say this is our text file named "Numbers.txt" the file looks like this : ------------...
[3 replies] Last: ifstream in("in.txt"); int i; while(!in.eof()){ in >> i; cout ... (by anup30)
Template class as a member variable
 
As the title suggest I am trying to use a separate template class inside of a new template class. I am confused on the syntax. Also I am going to be using the...
[2 replies] Last: Just do it like you would do usually with nested classes and put the t... (by Gamer2015)
Write a grammars program
 
I'm in a beginning programming class and I'm really struggling with understanding how to write this grammars program. It's supposed to translate english stateme...
[3 replies] Last: well then... this ought to be fun... (by jasonwynn10)
(BEGINNER TO C++) Determine the word with the most number of vowel and most number of consonants
 
write a program that ask for a long string and determine the word with the most number of vowel and most number of consonants example: The quick brown fox...
[7 replies] Last: hey daffodandelion I would recomend that you start with this: #i... (by jasonwynn10)
Animation Creation...
 
Hello and thank you for looking at this post. I need some help with this program. I am trying to make a (What looks like) a veteran who is saluting. This is wha...
[6 replies] Last: thx aceix will do but I am looking for a person who is good at making ... (by jasonwynn10)
Sort Vector of Maps by Map Value
 
I'm trying to sort a vector of maps by its stored value (not key) in descending order. Each index will have a series of addresses stored there, along with a key...
[1 reply] : You cannot sort a map (map is a tree) because maps use bidirectional i... (by Smac89)
Describing a triangle program can't figure out what i did wrong HELP PLEASE!
 
#include <fstream> #include <iostream> #include <iomanip> #include <string> #include <cmath> using namespace std; bool collinear(double x1, double y1, dou...
[1 reply] : Please use code tags - http://www.cplusplus.com/articles/jEywvCM9/ (by TarikNeaj)
by Grebu
How to use Templates efficiently ?
 
Hello everyone, I recently started fiddling with generic programming and want to improve on it. As I am programming microcontrollers, the size of the created co...
[4 replies] Last: Thank you again for those insights. They already improved my understan... (by Grebu)
Non-repeating
 
Hey guys :) I need to make a program that shows all numbers from 100 to 1000 but without the numbers whick 2 or 3 digits repeat. Example: Not to show 100, 1...
[1 reply] : Sounds good :) Wish you the best of luck! (by TarikNeaj)
guessing from a list of numbers
 
Okay, I need help for another problem: Write a program that picks a number between 1 and 100, and then lets the user guess what the number is. The program s...
[2 replies] Last: Ah, thanks. That'll work. I'll do that. I also had to make a prog... (by DragonOsman)
Count average c++ from
 
Hello. i'm creating a c++ windows form application. i don't know how to make to count average from file. Need help. I can input in file also read from file in f...
[1 reply] : For Example: In textbox1 i write: Tom Jones 10 Jone Jone 5 Tim Dunca... (by romasasss)
Class Inheriting with Vectors
 
I just finished a C++ class and we ended with basic inheriting and vectors with one class/struct, and I'm trying to combine the two. The code below, in a nutshe...
[1 reply] : Put the address on the customer, not the customer on the address. But ... (by poteto)
by yj1214
Using cout in header file...
 
#ifndef FOO_H #define FOO_H #include <iostream> std::cout << "FOO_H not defined" << std::endl; class Foo{ public: Foo(); private: ...
[2 replies] Last: > I'm not sure why I'm getting an error that says 'std does not name a... (by JLBorges)
Loading Bitmap
 
I've no idea what the issue is. I'm trying to load the pixel data of a bitmap into an array. I'm using std::istream::read to read in the pixel data. Maybe that ...
[8 replies] Last: Oh, so it's actually been working correctly this whole time. Thank you... (by Renthalkx97)
Adding an object to this tree.
 
Hello all Disclaimer: this is homework Justification: it is already been submitted :( / I want to know what I am doing wrong / I am not asking anyone to do ...
[2 replies] Last: Yes I see what you are saying. I am not sure how to handel the set ele... (by Bdanielz)
by Jt253
Car class Stream insertion Operator?
 
Car class- private members names are: name(string), year(int), passenger(int), maker (string). Assume that all kinds of constructors, destructors, mutators, and...
[3 replies] Last: I got it now.. Thanks! (by Jt253)
Sorting
 
#include <vector> #include <ostream> #include <algorithm> using namespace std; enum Razeni{Vzestupne, Sestupne}; class PraceSCisly{ public: ...
[1 reply] : Please edit your post and put the code in code tags. Highlight the cod... (by dhayden)
Trying to make VisitBook
 
#pragma once #ifndef _NAVSTEVNIKNIHA_H_ #define _NAVSTEVNIKNIHA_H_ //Vytvoøte modul, který bude sloužit jako kniha navštìv muzea.kniha navštev bude fro...
[no replies]
vector class
 
/*vytvoøte modul PraceSCisly, který bude obsahovat seznam celých èísel. Tøída PraceSCisly bude ve jmeném prostoru PrijmeniJmenoCpp2ZK. Program bude ob...
[2 replies] Last: almost I guess, I have problem with unary predikate method" UnarniPred... (by OneTwocz)
March 2015 Pages: 1... 910111213... 28
  Archived months: [feb2015] [apr2015]

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