General C++ Programming - February 2015 (Page 16)

C++ for loop
 
Hi so I'm a beginner and I have to solve this question: Using “for loop”, write a program to calculate and display 1+2+3+…+1000. That's what i did. I wan...
[3 replies] Last: Also I may be misreading but I think it should be #include <iostream>... (by sly858)
Program Help!
 
Hi, I've been having trouble with a program where I have to name my own text file then input a string of numbers. In the second step I must process the existing...
[2 replies] Last: Cool, thanks for the help! It worked out very well. (by ivertony)
2D game, how to handle drawing the order of object visibility?
 
In 2D games, what's the best way to handle the order of drawing objects? Because most games have a background, tiles to be drawn behind the player, perhaps tile...
[6 replies] Last: That all made very little sense to me. Keep in mind this is just a ch... (by Disch)
vector help
 
So I'm trying to delete a value stored inside one of my vectors but I can't accomplish this. My attempts are down below. I've commented out one attempt since it...
[10 replies] Last: "auto" automatically figures out the type, very useful for complex sit... (by tipaye)
Using MinGW to Compile PortAudio Examples with ASIO
 
I've been studying, "The Audio Programming Book." So far I can load audio files, apply various filters and analyses, and then save the result. Now, I want to st...
[no replies]
Mathematical Operations with digits in strings
 
Hey there, I'm working on a class project, and I'm having a difficulty. Suppose I have: string a = "21" and string b = "30"; normally, a+b=2130 (i.e concatenati...
[1 reply] : Convert the strings to integers (in this case) and add the results. ... (by tipaye)
How to store the same instance of one object in multiple vectors?
 
If I have a class object and multiple vectors, how do I make sure I store the same instance of that object in both vectors? For instance: Object object; std::...
[15 replies] Last: The SFML draw method, explained here http://www.sfml-dev.org/documenta... (by wh1t3crayon)
Anyone available to answer
 
We are preparing for our exam, this is a practice. Is anyone averrable that could work on part of this for me? Your immediate supervisor came to you ...
[1 reply] : What have you written so far? What, specifically, are you having trou... (by MikeyBoy)
how to output the euro symbol
 
here is the code i have so far, basically you have ti enter a price in pounds and it will convert it to euros. i have got the conversion working i am just unsur...
[2 replies] Last: char euro = 146; cout << euro; (by tipaye)
MUD Architecture Question
 
I've been thinking there are two ways for a room to "hold" items, mobs and players. 1) There could be a world object where items are mapped to VNUMs, mobs ar...
[no replies]
by Sobo
Can you explain this please..
 
please answer what will be the output of the code & why... int i = 10; printf(" %d %d %d \n", ++i, i++, ++i);
[1 reply] : undefined http://en.cppreference.com/w/cpp/language/eval_order (by ne555)
lil Help Needed with DSA trees!
 
I want to know about the ways to achieve the traversal in trees. Three kinds of traversal in, pre and post order, now what are the possible ways to achieve the...
[no replies]
by jazum
2d dynamic array help please?
 
Hi, I am writing a program that deals with 2d arrays. The program inputs the number of rows and columns and asks for the entries. When the program run and ...
[7 replies] Last: Your code contains: int row1,col1,i; // undefined values int** a= new... (by keskiverto)
Days of the week program
 
I am in a computer science class at LSU and i can not figure out how to writhe this program. The program must let the user input (MM/DD/YYYY) and then output wh...
[1 reply] : for the leap year part } if (!(Year2%100 == 0)) cout << " It is a... (by sly858)
Need assistance on printing out a cout statement using stored variables.
 
Im trying to run my program and it works fine until the very end where I want it to read "<name> is a <gender> citizen of <nation>." with the corresponding vari...
[2 replies] Last: you use something confusing logic. what is for nation variable? shoul... (by sujitnag)
Need assistance with Bonus Rate program
 
I realllly need help with a program. I am not even sure where to start and what exactly to do! JM Sales employs 10 salespeople. The sales made by the salespe...
[2 replies] Last: #include<iostream> #include<numeric> #include<vector> #include<ioman... (by sujitnag)
Help with do while loops!
 
Please help!! In a little over my head! I am continuing an assignment that our class has been working on at home for about a week and have run into a snag. W...
[7 replies] Last: Does anyone understand the do while? I am not sure of how to put it in... (by TackyTechyy)
lab programs need to be solved.
 
Design and implement a c++ program to create a abstract class- shape to represent any shape in general. the class should have two pure virtual functions to read...
[2 replies] Last: OK DONE... (by rahulmmys)
C++ Intermediate Level I/O Operation
 
Hi, I am glad to read helpful guides here in this forum and this time, I really need your help with regards to my problem. Ok, so my C++ console application sh...
[2 replies] Last: http://stackoverflow.com/questions/9505085/replace-a-line-in-text-file... (by tristan1333)
std::shuffle vs std::random_shuffle not making any sense to me
 
Bad question which cannot be deleted now.
[4 replies] Last: Ok, thanks MiiNiPaa. Dumb mistake. (by prestokeys)
February 2015 Pages: 1... 1415161718... 26
  Archived months: [jan2015] [mar2015]

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