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

enum type problem
 
Here's some code: for(NomChef nomChefActuel = 1; nomChefActuel <= NOMBRE_DE_CHEF; nomChefActuel++) { (...) } In this for loop, NomChef is an ...
[9 replies] Last: ok then... thanks for the input... switch-case it is!! :-) AeonFlux (by AeonFlux1212)
Project Suggestions
 
Hello ! Good night everyone ! I write my first post with the intention to know if anyone can guide me about wich is the most efficient way to develop the pro...
[no replies]
by fafner
remap-functions
 
I'm not quite sure where to post this, but here it is. I used to play a little with Processing, and for those of you who know it there is a function called map,...
[3 replies] Last: The two functions are not equivalent, because your math is wrong. You... (by Duthomhas)
Output code
 
so I wrote this code in class today and I'm almost done but I need to come up with some sort of equation to add up all the total values. The problem is I am rea...
[1 reply] : track each total and add them to another total variable whole_total +... (by CroCo)
Adding items from a file to a vector of class
 
Hello. I need assistance on how to add a list of information from a file to a vector of a class. Here is my code: Champion_Info.h #ifndef CHAMPION_INFO...
[6 replies] Last: For now it will always be 6 items, but I may change it to vary in the ... (by crimsonzero2)
Menus in C++
 
I am trying to add a menu option called "Manager Menu" in the code that I have provided. I have attempted to already, but am stuck on what to do next. I am re...
[4 replies] Last: Look at your program flow: case 5: // <- this case label en... (by Disch)
Can someone help me with my Function program?
 
Write a function declaration for a function that computes interest on a credit card account balance. The function takes arguments for the initial balance, the...
[no replies]
big-O help
 
If your computer takes 2 μs (micro-seconds) to calculate 1 primary operation, what time will it take to solve a problem with a number of operations as in Probl...
[1 reply] : Why don't you simply put the numbers in and evaluate the equations? (by keskiverto)
by Xion18
Comparing Split Integer
 
Hey everyone I need a bit of help. I read and search online, and nothing really help me solve my problem for this program. Program: Compares two positive int...
[6 replies] Last: Thank you I get the jist of it (by Xion18)
Hi. I need help with my queue project.
 
I wrote a queue program that is supposed to give the following outputs after the first 30 minutes. The time of arrival for each customer. The time of leaving ...
[5 replies] Last: You never initialize or change the value of customer , what is this v... (by LB)
by Alby94
dynamic array of variable-length strings!
 
I believe that everything is fine except that I can think of the condition can be inserted inside the parentheses .. #include <iostream> using namespace std; ...
[2 replies] Last: [quote=kbw]Do not use malloc/realloc/calloc/free in a C++ program. No... (by Duthomhas)
by ediko
A couple sequences
 
Hello members of c++ community! :) Today is the sixth day when I am trying to solve a couple sequences. Maybe here are some very smart guys for who these sequen...
[3 replies] Last: Hits: 5 18 25 15 2 -5 +13 +7 -10 -13 -7 ? What... (by Duthomhas)
Throwing Exception, Segmentation Fault
 
The below method causes a segmentation fault. The method is intended to insert something into some position of a linked list. It works as long as the first if s...
[13 replies] Last: throwing an exception You are not trowing an exception here. You hav... (by MiiNiPaa)
Code::Blocks not recognizing operators
 
So I have this code in Code::Blocks: vector<int>puzzleBox; ... (bunch of code, assigning places in vector to integers) int b; while( b != puzzleBox....
[2 replies] Last: That solved my problem, thank you! (by TsarLenin)
Is std::lock_guard exception-safe?
 
In this scenario: try { std::lock_guard<std::mutex> guard(mutex_defined_somewhere_else); return map_accessible_in_another_thread ; // Exception could b...
[2 replies] Last: I thought so. Thanks. (by chrisname)
linker error HELP!!!!
 
#include <cstdlib> #include<iostream> #include<cmath> #include<iomanip> #include<string> using namespace std; //define global vars const int C...
[1 reply] : //declaration void calc_Overtime(const int&, double Hours ,double Ove... (by MiiNiPaa)
Need help with I/O String File Formatting
 
Hi everyone, I was hoping you could all help me. My assignment is to take this text file "Lincoln.txt" " The Gettysburg Address Fourscore and seven yea...
[3 replies] Last: You might also look at this post http://www.cplusplus.com/forum/beginn... (by SamuelAdams)
Multiplication Table
 
Hello, everyone. I am in a c++ class and I have to create a multiplication table for an assignment. We have to use <iomanip> to format the cells so that they li...
[5 replies] Last: @whitenite1 I apologize, I was tweaking your code a little bit to do w... (by thiskid)
Static Pointer to a class that is used globally
 
If I need a static pointer to a class that is used globally(multiple files), and I only want to allocate memory once. One way is to create a function that ret...
[1 reply] : MyClass *getMyClassInstance() { static MyClass inst; return &... (by LB)
loop to read in data and check data
 
struct receivers {string fname, lname, team,; int receptions, yards, TDs, longest,rec20, fumbles, yac, firstdown; double, averagepergain, averageperrec }
[2 replies] Last: Did you ever figure this out? (by cmorrison)
October 2013 Pages: 1... 3132333435... 46
  Archived months: [sep2013] [nov2013]

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