General C++ Programming - October 2014 (Page 24)

Please help with code!
 
#include <iostream> #include <string> #include <iomanip> using namespace std; const double PI = 3.14159265358979323846; struct Cone { doub...
[3 replies] Last: but like Ispil says you arent storing the height and radius values at ... (by mutexe)
by gsoble
Having some issues with function/const
 
Okay, so for an assignment I need to write a function called find() that returns a reference to a vector. So I have vector <int> & find(string & key); If I ...
[5 replies] Last: Can you post exact wording of your assigment? (by MiiNiPaa)
by Taban
Synchron Data Transfer
 
Hi all, I have a question about communication over tcp/ip sockets. I have a master computer and i have to send string data to my client pcs. I am using b...
[2 replies] Last: Thanks for reply, i will look that guide. (by Taban)
Need a little help.
 
I am doing an exercise in a book im currently reading and it goes like this: Write a program that reads a string of characters including punctuation and write...
[3 replies] Last: #include <iostream> #include <string> #include <cctype> int main() {... (by JLBorges)
A map inside a map
 
Hello. How do you store a map value inside a map? Here's my code: map<map<string, string>, int> Name;
[6 replies] Last: Okay. I get now thank you. (by nooblet001)
by ShotYe
System("cls") doesn't work with my case 4
 
I can't figure out why my case 4 won't work. Every case is suppose to cls after the operation finish. But somehow case 4 will just ignore and go back to main me...
[3 replies] Last: maybe visit reference section to for case format http://msdn.microsof... (by closed account 1CfG1hU5)
How to read & write certain characters from a File ?
 
How to read some characters from file, I know we can move a pointer to some position using seekg() & seekp() function, get current position of the pointer throu...
[3 replies] Last: All input/output operation work from current read/write pointer positi... (by MiiNiPaa)
How to break out of switch from a function?
 
So basically I have: // FUNCTION double function(double input) if (input < 0) { return 0; } else { return input; //code } // END FUNCTION ...
[4 replies] Last: Well, what I recommend is that you do something like this: do { ... (by Ispil)
Displaying constants as a decimal/hexadecimal/letter
 
I need to write a program in which you do the following: Define three named constants using the appropriate data types: DEC_NUM = 65; HEX_NUM = 0x7a; LET...
[1 reply] : Homework is for the beginner subsection... You define then using #d... (by poteto)
by tmason
Assignment; Speed Test of for() loop vs std::for_each()
 
Hello, For a class assignment, I was asked to create a program comparing the speed of a for() loop versus a std::for_each() loop. Below is what I came up ...
[2 replies] Last: @cire your code is awesome; half the size, more functional, and a bett... (by tmason)
Program crashing when initialized
 
Hi, I just finished coding a program that is based on polymorphism and inheritance but when I ran the program it crashed? I do not know what is the cause of th...
[9 replies] Last: Yes it did work after removing the * from the shape constructor! Than... (by puffybear123)
Array Program
 
Assume that you are asked to develop from scratch another application for the EMOVIE company. This company has sold movies from 4 main motion picture production...
[1 reply] : ...what's the difficulty? (by Ispil)
HELP ME THIS TOPIC
 
Task 2: Write a program that randomly generates two sets of integers that is, 1000 integers. Determine whether there exists an integer in the first set in such...
[1 reply] : lots of the integers could match from each set. what is the range of ... (by closed account 1CfG1hU5)
by tmason
Advice on Best Approach, Singleton Class for User Settings?
 
Hello, I am wondering if I can get advice on the best approach on working with user settings. My current idea of how to work with user settings goes like ...
[9 replies] Last: Well, in the snippet I posted the configuration is held in an in-memor... (by JLBorges)
Making enemies go around an obstacle
 
I'm making a shooter game and have added random obstacles to it to make it more challenging. The problem is trying to make the enemies go around them. They coll...
[3 replies] Last: uhh, make a moderately small 2 dimensional pixel by pixel bool array a... (by poteto)
How to take a input from keyboard using fgets and atoi?
 
Intead of using scanf("%d",&a) to take a input from the user,how to take a input using fgets(buffer, BUFFERSIZE , stdin) and atoi? Could anyone show me an exa...
[1 reply] : The inputs are all integers. (by JackieCho)
How to Toggle Tabs C++?
 
Greetings! I am using foundation tabs in my code. It works absoultely fine ! I want to toggle the tabs now.. When clicked on the tab the tab content should be ...
[no replies]
How to use a class with a array of objects
 
class FlashCard { public: int a,b; void PrintCard(void); int CorrectAnswer(void); }; void SwapFlashCard(FlashCard &a,FlashCard &b) { FlashCard c;...
[7 replies] Last: #include <stdio.h> #include <stdlib.h> #include <time.h> class Flas... (by JackieCho)
'showStructure' : is not a member of 'List<DataType>'
 
I keep getting this error but I don't know how to fix it. show5.cpp(37): error C2039: 'showStructure' : is not a member of 'List<DataType>' Any help is appreci...
[1 reply] : Ew, dat #include "show5.cpp" . I'm not sure if its the problem, but ... (by poteto)
charges
 
what variables do i use so that is the user chooses no they will display total amount of cars, total amount for all cars, and average charge per car? #include...
[3 replies] Last: ok thamkyou (by sammweout)
October 2014 Pages: 1... 2223242526... 38
  Archived months: [sep2014] [nov2014]

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