General C++ Programming - March 2016 (Page 18)

Converting a Decimal into Inches
 
Hi guys, so in my program I need to have the user enter in 1 cin statement their height in decimal-like format, ie 5 feet 10 inches = 5.10 . I'm then required t...
[6 replies] Last: @ prestokeys Very true. Unfortunately, the OP's assignment is specifi... (by Duthomhas)
how to output the file including Bin& ASCII
 
hey everyone, I wanna get the idea how to output the data from a file that including binary and ASCII data. the file I wanna decode is the 0000file. Any one h...
[1 reply] : You can us an ifstream to open the file in binary mode and read char b... (by Thomas1965)
Error in perfomance of cin function!!!
 
#include<iostream> using namespace std; class profile{ public: int age,name,gender; char ocuupation ; }; int main(){ profile pro1; cout<<"Lets create a ...
[4 replies] Last: Thank u guys : ) (by harshildj99)
by jeggu
How to pass main object reference to its all low level modules in c++
 
When ever I create my main(Car) object, internally its creates low level modules one by one. I am referring some function in main object in all internal object...
[4 replies] Last: Thanks. (by jeggu)
Need help on array initializiation (Class attribute)
 
Hi, I recently started a personnal project : A Match-3 type of game (Where you match 3 of the same type and they go away). I am aware I might not be able to ...
[2 replies] Last: Yeah that's what I did and it fixed it ! WOOT (by Viiarge)
what am I missing or doing wrong
 
I am trying to finish my midterm project and at line 10 when I enter what I want from line 11 to the end of the code is displayed can someone tell me why I am t...
[5 replies] Last: You remind me some people im at university with :P Handing out their p... (by Viiarge)
Gradebook Program Help?
 
I'm trying to make a program that'll add students and their ID's as well as courses. I'm stuck on the part of putting students into courses. I was thinking of u...
[2 replies] Last: okay guys I got it to added students to a course and show how many are... (by Physiccx)
Comparing Merge and Heap Sorts
 
I am trying to compare the heap and merge sort using their runtimes and have the program all created. However, the final data I receive, sending to a new file, ...
[2 replies] Last: First, Is it not in code tags? When I look at it, it is in code tags. ... (by Indianna32)
Attack function for a game
 
At my university, we have to build a prototype for a game, and my team and I have decided to make it in visual studio to show off the feathers of our game. The ...
[2 replies] Last: Ok, so I figured it out. board ->legal_attack(fr,fc,tr,tc,board) is r... (by Pat0010)
Using a while loop write a simple coin flip game.
 
Hello can you help me change the code so that it functions properly. It keeps saying sorry you lose. the coin came up o. #include <iostream> #include...
[5 replies] Last: What do you think this line if (headsortails == zeroOne) is doing? z... (by booradley60)
String letter comparisons
 
if (input ==letter ){ word=true; Where input is a string and letter is an array. Somehow, I'm getting the error that the "==" operator does not exist....
[1 reply] : letter is an array of what? (by Peter87)
by lmg275
Duplicate symbols for architecture?
 
I have an assignment where I am supposed to create a header file, a function.cpp file, and a main.cpp to create a gradebook for students where you can set and a...
[1 reply] : One problem is that you have names in your class with the same name as... (by Thomas1965)
Checking if it is already exist
 
I've been working this program for 2 days and I can't figure this out. Unique record means that the program should check if the inputted Account Number already ...
[7 replies] Last: Actually binary format is easier to use. FILE fp = fopen("Accounts.bi... (by Thomas1965)
Table of different types
 
I'm trying to make a table where each column has its own type (which is known at compile time), with a get(columm, row) function where the return type is based ...
[9 replies] Last: Ahh, okay thank you that makes sense. (by shadowmouse)
reading a column from a text file
 
Hi guys.Here is the part of code i use to read and store every value including spaces from a line std::string line; std::ifstream Host("Host.txt"); while...
[5 replies] Last: isnt there a simple solution i mean i only want to read and store eve... (by Chervil)
Quick check for a equal value in a integer vector
 
Hi my friends, i want to ask , if somebody know some instruction for make next code quicker : bool haveFree(const vector<int> &F) { for(int x : F) { ...
[10 replies] Last: Thanks, it is also a idea. But may be a good compiler already will com... (by danjiun)
reading a file from .txt
 
Just wanna ask how to read a file from a .txt in this case you encode the list(employee name, employee number, tax ) directly to notepad. I only know how to rea...
[4 replies] Last: #include <iostream> #include <fstream> #include <string> #include <cst... (by Thomas1965)
DEAL OR NO DEAL C++ CONFUSED AND NEED HELP
 
#include<iostream> #include<cstdlib> #include<stdio.h> #include<time.h> #include<string> using namespace std; int main() { double brief = {1,5,10,2...
[no replies]
hbjhbj
 
hjh
[4 replies] Last: I think you should be confused because your code not following the pr... (by Calcushtag)
Remainder
 
Anyone can help me for this,How to get the remainder? #include<iostream.h> #include<conio.h> main() { clrscr(); double a,b,sum,difference,quotient,pro...
[4 replies] Last: Thank You very much!!! :) (by Reb0rn07)
March 2016 Pages: 1... 1617181920... 23
  Archived months: [feb2016] [apr2016]

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