General C++ Programming - October 2013 (Page 32)

by Disch
Is it harmful to create 1000s of mutexes?
 
Working on something where I need to be at least somewhat thread-safe internally. I have one "big" class which houses several smaller objects. Each individual...
[2 replies] Last: Cool. That thread suggests that having a lot of mutexes is not expens... (by Disch)
C++ Program to initiate through command line
 
The following program is what I have so far. it reads from a pat.txt (patient list) and don. txt (doner list). pat.txt Patients 5 Androf O heart 24 2012 Bla...
[no replies]
Reading file values by passing reference to a function
 
Hi everyone! I am trying to read the file which has the values stored in the following pattern 2 4 10 103 2 504 .... and so on I Have opened the file a...
[9 replies] Last: Thanks All of you especially cire and Caligulaminus :) cheers (by menewbie)
Student grade assignment
 
Write a C++ program that computes a student's grade for an assignment as a percentage given the student's score and total points. The final score should be rou...
[no replies]
Need Help with While LOOP
 
Hello. I'm new to programming and also to C++, i've been working on something, but I got a problem while comparing my string. What I need is, when I just press...
[8 replies] Last: Yea, that's what I thought, didn't worked because I wasn't testing the... (by Lemonkiss)
Classroom Structure
 
The assignment is Create a structure for a classroom. Make sure it includes the following: Room Number, Lecture Name, List of Students, Nu...
[2 replies] Last: I see you wish to create functions to do this, but are you not allowed... (by booradley60)
C++ Program that accept the height of Philippine FLAG and display the flag!
 
#include<iostream.h> #include<conio.h> main() { clrscr(); int n, i, j; cout<< " Input the Height of the Flag of the Philippine! \n"; cout<< " Input only...
[3 replies] Last: Maybe it was an example how you should not write your code? (by MiiNiPaa)
running on windows
 
i have Linux so can someone test this out. here's the link. https://www.dropbox.com/s/pg6oevdfz3nly1p/coo1_program.exe
[5 replies] Last: *steps bravely forward* I will try it! (sandboxes are made for this ;)... (by closed account Dy7SLyTq)
Move a node to the front of a doubly linked list
 
Hello, everyone. I'm relatively new to doubly linked lists, and I have to write a method that moves a node to the front of one. Here is what I have: templat...
[2 replies] Last: Thanks for the help! (by Fifolifo)
STL & Data Structures
 
Hello my dear fellow programmers. My name is Aleksandar, I'm 24 years old and I've been "programming" in C++ for couple of months now, started with C at my univ...
[8 replies] Last: Just pretend that size is non-constant and actually is received from u... (by MiiNiPaa)
printing function output to a file
 
Hello all, I am very new to C++ and I have a project due tomorrow in my C++ class and I'm rather stuck. I have to convert a binary value from an input file (...
[2 replies] Last: fcin.open("inputFileName"); It does not open the file specified by us... (by MiiNiPaa)
by tegi00
Getting a strange error in my RPN Calculator program that uses array implementation of a stack
 
SOLVEDjavascript:editbox1.editCancel()
[2 replies] Last: since line 45 (and 63) does nothing you cannot store more than 2 eleme... (by coder777)
Solved.
 
Solved.
[2 replies] Last: This part is your main problem: std::ostream& operator<<(std::ostre... (by Shonei)
by bpince
C++ error
 
NewcastlePort.cpp: In function ‘int main(int, const char**)’: NewcastlePort.cpp:30: error: no matching function for call to ‘SENG1120_ASS2::Queue<SENG112...
[10 replies] Last: main now looks like: int main(int argc, const char * argv ) { Queue... (by bpince)
Using CTRL+X to end a stream?
 
Hi, So for my computer science class I need to create a program that allows a user to input an indefinite number of numbers (as many as they want), and then ...
[2 replies] Last: #include <iostream> int main() { constexpr int ctrl_x = 24 ; // ... (by JLBorges)
by LB
Use member of value as key to map
 
A long time ago on this forum when I was very new to C++, I happened to see Disch/Duoas/someone else with knowledge give an answer to someone using some boost m...
[9 replies] Last: OK, so what I'm getting is, Boost is not the answer here. Thanks for t... (by LB)
Static Variables, Need Help!
 
What does the order of console output from your program tell you about when the static object is initialized? #include <iostream> using namespace std; //cl...
[7 replies] Last: How do I make my "return type" not pass-by-pass reference? I guess tha... (by shamieh)
Functions in Classes
 
;;;
[1 reply] : You need a constructor, a function called add, and a function called p... (by ats15)
Help me about Strings please :(
 
Hi? I have a problem about like this. It troubles me cause I dont know how to code this really. I dont have an idea like its really empty. please help me :( Wr...
[1 reply] : I believe you are dealing with fstream's. Here is some sample stuff. H... (by bingo1)
How to declare an empty method?
 
It has been a few years since I have had to do this, but I need to declare a method in my base class, but produce no code for it. Then when this library is used...
[2 replies] Last: That is it! I forgot the "= 0" at the end of my definition. Thanks for... (by Sephiroth)
October 2013 Pages: 1... 3031323334... 46
  Archived months: [sep2013] [nov2013]

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