General C++ Programming - September 2016 (Page 12)

by m7md65
Help with assignment
 
hey, my professor told me to do a program that prompts the user for an integer number, displays the following menu: 1) number divisible by 3 2) number betwe...
[2 replies] Last: here is a start. Just put your code in the different cases and in def... (by leon13)
Best approach for dealing with unavoidable duplicate keys in a hash table?
 
The project I am currently working on is an engine that needs to deal with a large number of plugins, including those built by other parties. I need an object ...
[2 replies] Last: I thought of doing that Thomas and it is a possibility I could use. I... (by primem0ver)
Private vs. Public data members
 
Hi everyone, I am a beginner in C++ and in programming but I have a general question to experienced C++ programmers. I would really appreciate to get your op...
[6 replies] Last: Wow... It seems so simple that I can't imagine I didn't see it that wa... (by leoleoleo)
Incorrect output from popen
 
Hi , i am using following code to execute shell commands (using popen). std::string exec(const char* cmd) { char buffer = {0}; std::string res...
[2 replies] Last: HI ne555, Actually in c shell 'echo $?varName' will give existenc... (by balu soutani)
Multiple datatype in std::vector
 
Hi, I have this struct which returns double value of x & y. I want one more datatype in return(with this double), suppose of type int. How to get that?What mod...
[9 replies] Last: Ahh, a continuation for http://www.cplusplus.com/forum/general/197244/... (by keskiverto)
Read integers from file - create new file with output
 
Hello all, I have a task that I have to do with C++, And so far I am finding it quite complicated since I am a beginner. Would someone please be so kind ...
[3 replies] Last: @Chervil - thank you very much for your input, can't wait to try this ... (by Zoliidais)
std::vector
 
HI, I have a struct defined as std::vector<pointt> arr; struct pointt { pointt(double _x, double _y) : x(_x), y(_y) {} bool operator < (const point...
[4 replies] Last: Thanks (by sam1989)
by mizsum
Need to print "zero" if there's no positive elements in input
 
I have to read numbers from std input and if there are no positive elements I need to print "Ave. = 0.00". Let's say the inputs are going to be "1 2 4 -3 -6 6"....
[1 reply] : You don't say what happens when the input contains both positive and n... (by Chervil)
Convert file to hex and back
 
I am trying to make a program that will load any file and convert it to a vector of hex values and then turn those back into the file that was loaded, but it on...
[1 reply] : Ok I figured out the problem. fstream newFile; newFile.open(newFile... (by Bingocat4)
int main() or int _tmain() ?
 
I've been starting to learn about OpenGL and other Graphics Libraries and I've been noticing tutorials and people using "_tmain" instead of main. I have searche...
[2 replies] Last: http://stackoverflow.com/questions/895827/what-is-the-difference-betwe... (by closed account E0p9LyTq)
by mbozzi
Iterator invalidation / Quicksort bug
 
I am writing a quicksort for an exercise. I gave it a shot, and it didn't work. I just spent the past few hours staring at it, and still have no clue what's w...
[6 replies] Last: Yeah -- I'm moving the value at the real pivot around when I call par... (by mbozzi)
Help with writing/printing to and from an array in private data member
 
elements.cpp #include <iostream> #include "elements.h" using namespace std; int main( ) { double v=0; double j=0; PlainBox bo; for(int i=0;i<10;...
[3 replies] Last: Part of the assignment requirement is to have a variable to hold the n... (by jlb)
by leon13
what to learn next in c++?
 
i everyone im looking for some recomendations on what i should learn next in c++. Ive been programming for a about a few months now and I know most of the basi...
[8 replies] Last: I think you mean performance here. If you compare raw code (switch st... (by cire)
Which zip library should I use?
 
Which zip library should I use? There are so many choices. I need to create new zip archives and open existing ones. I need to create new files in the zip ar...
[2 replies] Last: Thank you! (by carlwryker)
by Kyle M
managed pointers for CC
 
Hi there I was making a copy constructor for a LinkedQueue class and it compiles but I think there is something mixed up in it, please let me know if you see an...
[1 reply] : > but I think there is something mixed up in it ¿what do you mean? >... (by ne555)
by bp04
How to use Command line in other c program file
 
I have command line file which i want to use another file. Example: 1st program:\ int add(int argc,char* argv ) { } in header file extern int add(int ar...
[1 reply] : You can do it with 3 files: //add.h maybe find a more meaningful name... (by Thomas1965)
by bp04
Fatal error occurred while compiling the program.
 
I'm using dosbox with the borland c compiler.I was compiling a program which was already exist in my drive. Then the fatal error occurred which said "unable to ...
[3 replies] Last: Try reinstalling borland, save your project before (by shadder)
sorting word a loot
 
So i have this challenge atm. Write a small program that can take a string: "hi!" and print all the possible permutations of the string: "hi!" "ih!" "!h...
[4 replies] Last: if you use the std:: , your code will be more readable and everythin... (by Farshad Aroon)
I need some help with commands
 
I need the user to write an input and then the console executing it like a line of code. Example: string a; cout<<"Please type in a command:"<<endl; cin>>a; ...
[13 replies] Last: It's fairly easy to do in windows with C++ and there are lots of refer... (by closed account 48T7M4Gy)
Age program HW help please
 
i came across this hw and completely stuck please help!! it's asking to write program to display age (int age; int min=18; int max =40; if age < min ...
[1 reply] : int main() { int age = 0, min = 18, max = 40; cout << "Enter your age... (by Uk Marine)
September 2016 Pages: 1... 1011121314... 19
  Archived months: [aug2016] [oct2016]

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