General C++ Programming - February 2014 (Page 4)

by OscarB
Loop if I use a letter and/or a negative number.
 
Hi guys, I have a piece a code which I cannot fix: NEGATIVE_STOCK_PRICE: cout << "\nPlease enter the desired stock price: " << workCurrency << e...
[1 reply] : Either get rid of cin >>putOption0.S; before condition or make first... (by MiiNiPaa)
by koyel
mergesort
 
I cant understand these things at all. we have to solve the following using c++ a) Write a procedure which implements recursive Mergesort on a given arr...
[1 reply] : someone please help (by koyel)
c++ program converting the date to roman numerals
 
I need some help with a program to convert a date entered into roman numerals. I can only use one output prompt to get the date, so that makes it more difficult...
[1 reply] : Here is rosettacode example modified for C++11: #include <iostream> #... (by MiiNiPaa)
Struggling With Card Game " Pairs
 
Hi, I am struggling with implementing the Poker hand ranking 2 pairs into my card game assignment. Below is the code i used to create my single pair function...
[4 replies] Last: Thank you for the help, much appreciated (by Tarkan1857)
by bxrz
Making a program read a word in backwords/reverse?
 
Hi guys. Lets say I have my name "Kevin". What would the program be so it reads "niveK"? Can anyone write the program for that?
[4 replies] Last: We're actually not allowed to do your homework here, forum rules. So... (by Computergeek01)
Options(Monte Carlo Simulation)
 
vector<double> myVec2; for(int i = 0; i < 1000; i++){ myBarrier.generatePath(); myVec2.push_back(myBarrier.thisPath.back()); } cout << "mean of...
[6 replies] Last: thank you very much. I appreciate it (by JohnMyer87)
String subscript out of range
 
I get this annoying error whenever I try to use either <string> or any STL container. Everyone I saw so far, says that "using a .reserve(n)" before adding items...
[3 replies] Last: Thank you very much for the explanation. Understood it now :) Raul ... (by jumper007)
strtok_s in C++
 
I have a problem, so you can explain me what the "context" in this source_code This is Stebe jobs's code: #include <iostream> #include <fstream> #include <ios...
[4 replies] Last: I understand. Thank you very much KBW! (by mocnhantrang)
Simple Error that keeps popping up..
 
Hello all, I'm working through a C++ book, and the past couple examples I'm getting the error: error: expected ";" before string constant error: statemen...
[2 replies] Last: Well, I officially feel like the dumbest person on earth..LOL Thank ... (by jakelawson44)
by xx1182
Just wandering about sdl SDL_RenderPresent()
 
So, i was trying to undestand how it works, and checking the code gave me this: /** * \brief Update the screen with rendering performed. */ extern DECLS...
[18 replies] Last: Wiki page for SDL_RenderPresent: http://wiki.libsdl.org/SDL_RenderPres... (by BHX)
Getting The Processor Family
 
Is there a macro for retrieving the CPU Family(x86, PPC, ARM). I have seen such a method for detecting OS. #IFDEF _WIN64 doThat(); #ENDIF Is the...
[1 reply] : There is no standard and compatible mode to do that. You will need to ... (by MiiNiPaa)
How to make a c++ program send itself to other computers?
 
Hey, I'm a C++ programmer looking to make a WinApi program that send itself to other computers of the netwrok or to emails stored in the computer. Thanks!
[3 replies] Last: I don't think this guy has any clue of how PC's work. (by S G H)
Struggling with key state alternative
 
hi, currently using this which works however causes some problems so i want alternative to getkeystate or getasynckeystate but follow same principle. if...
[4 replies] Last: hi, its not that it doesn't work. it works perfectly but for one reas... (by l2playuk)
Monte Carlo simulation for look back call option with continuous barrier
 
I NEED TO APPLY MONTE CARLO SIMULATION MODEL TO LOOK BACK CALL OPTION WITH CONTINUOUS BARRIER ON C++. THERE ARE ALL HEADER AND MAIN CPP FILES BELOW. THIS IS JUS...
[no replies]
by kimi86
Virtual Functions
 
Hi All, I am running following code class A { public: virtual const char* GetName() { return "A"; } }; class B: public A { public: ...
[6 replies] Last: First, we instantiate a C class object. rBase is an A pointer, which ... (by MiiNiPaa)
Making arrays for equipping weapons in a simple rpg game
 
I have a sword(25 damage), spear(20 damage), arrow(15 damage), dagger(10 damage) and knife(5 damage). I want to make a class for them so that I can equip one of...
[1 reply] : make a class perhaps call it weapon ? struct Weapon { Weapon... (by rmxhaha)
by pervez
Help for receiving data and visualizing from UM6 to PC serial port
 
try{ if(ReadByte(&data)== TRUE) { Sleep(100); dataout[index++] = data; //cout<<dataout<<"\t"; if(parse_serial_data( &data, 20, &new_pa...
[2 replies] Last: Anybody has any sugession..please help!! (by pervez)
by bxrz
Can anyone help me write this program?
 
Im a beginner to C++. Its my first year in college. Im completely stuck at this. Can anyone post a program of how it would look for this problem? Here is a pict...
[2 replies] Last: Duplicate of http://www.cplusplus.com/forum/beginner/124632/ Please d... (by MikeyBoy)
Multi Agent Path Finding
 
I am new to Path Finding so I just know BFS, DFS, Djisktra, and Basic A* I've searched for a few multi agent pathfind paper here and there. But I can't seem...
[1 reply] : -bump- No Body ? (by rmxhaha)
Random number generators!
 
I'm writing a program for a ferry that has to unload and load vehicles between two ports. We have to use the random number generator function in our class to ge...
[1 reply] : The C PRNG works like this. You call srand() to seed the PRNG. Then ... (by kbw)
February 2014 Pages: 123456... 33
  Archived months: [jan2014] [mar2014]

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