General C++ Programming - August 2012 (Page 27)

NewLine Creates an Equal Sign with new Line in Fstream
 
I am making an application that compresses CSS/HTML/JS Files by removing white space and other things but in the section that removes whitespace whenever a newl...
[2 replies] Last: Ty it worked (by Reg0r1us)
(SDL) Button wont show on screen
 
Hello, I'm trying to make a button appear on the program using SDL but it doesn't show. When compiled, there is no error, but the button just won't show, I have...
[4 replies] Last: I see, it was my bad. I was thinking more like making the button appea... (by tianajrp)
area under curve help
 
Hi, I've been using C++ to calculate the approx area under a graph with trapezium rule. The graph I want to calculate the area under is y=1/x with lower limit...
[5 replies] Last: Thank you KRA :) I got the + and = in the incorrect order (by Person1001)
Replace array with number if
 
Could someone help me with this problem I have? Basically I have to generate an array of 8 numbers and give all them a random value between 1-10. Then I have to...
[1 reply] : if(c >a) { c =100; cout<<c <<" "; } How is c ever goin... (by AbstractionAnon)
std::move function and its argument
 
Hi, I've been reading about r-value references and the fact that they can't bind to l-values. But std::move function has the following definition: template<...
[12 replies] Last: reference collapsing is a trivial and obvious property of any language... (by Cubbi)
Help!!!
 
How my program to loo like this Sample Input 3 3 5 4 1 2 1 3 3 1 Sample Output 3 5 4 : RIGHT TRIANGLE WITH AREA 6.00000 UNITS SQUARED 1 2 1 : N...
[3 replies] Last: Ok, Just keep one thread going, otherwise you will have new threads al... (by TheIdeasMan)
Help with the code!!
 
Why is the code taking more than 9 inputs? (1 Input= 4 integers separated by spaces on a single line) #include<iostream> #include<algorithm> #include<con...
[1 reply] : Probably because you are accessing the matrix out of bounds, affecting... (by ne555)
Help with the code!! Urgent
 
I need to set the cells with the distance from the center such that val =0. Eg: 4 3 2 3 4 3 2 1 2 3 2 1 0 1 2 3 2 1 2 3 4 3 2 3 4 Code: #include<iostream> #i...
[2 replies] Last: Sorry for making it hard to understand. I hope nw evry1 cn undrstnd an... (by thepanther)
I need help on coding this program (1,2)
 
Create a program that will ask the user to input his/her birth month and birth date. The program should display the ZODIAC SIGN and its description based on h...
[21 replies] Last: I did something @_@ i just don't know what codes should i use (by wanderevil)
Having trouble reading input from file
 
I have data in a data file eg. 31 1 1193 Ages Ago 15 7 2011 Description Here 6 5 2011 Which is able to go up to 10 different words The first column determine...
[no replies]
by sprelf
Heap corruption problem
 
So I just started trying out some multithreaded programming for the first time, and I've run into this heap corruption problem. Basically the program will run ...
[no replies]
The program would not compile..
 
Here is what I have to do: Write a C++ program to "draw" ellipses by printing characters, to the following specifications: Prompt the user for values for ...
[7 replies] Last: TheIdeasMan and cnoeval...with all due respect, i did not mean to do i... (by trex123)
by rossig
declaration can't solve the overloaded address function - compiler error
 
Hello everyone, I have the following line, as I understood in the examples, I should be able to write this, but I got a compile error. using nam...
[3 replies] Last: Athar, you're right, thanks for your tip anyway. I was trying actually... (by rossig)
DarkGDK Problem
 
So I had my friend download the directx 9.0 runtime optional components stuff that is needed for darkgdk and it still won't run. It says the application configu...
[2 replies] Last: for development process ,we have to use Directx 9.0 SDK, not "directx ... (by Benjay)
by Aarix
Hows this?
 
Hello guys I suck at martix operations and decided to make this, im pretty proud of myself since I used my previous kmowledge Here it is: #include <ios...
[1 reply] : Wouldn't this be easier in a 2D array instead? Then you could simply p... (by Volatile Pulse)
Is it possible to edit the cin input buffer?
 
Is it possible to start a cin that already has text in it? So like the input buffer already contains characters before the user types anything in.
[9 replies] Last: Thanks viliml, workarounds are somewhat of an art (by Common Wealth)
Why do people measure code in "lines"
 
It doesn't mean anything seeing how some people leave more comments than others and other things like if(condition) { //I output text here. cout<<"This i...
[5 replies] Last: There has been many topics covering this, but later on down the road, ... (by Volatile Pulse)
ceil() working improperly
 
The following code outputs 1 , which is incorrect... #include <iostream> #include "math.h" using namespace std; int main() { cout << ceil...
[5 replies] Last: any time (by Zephilinox)
bitset vs own implementation?
 
Which would be faster? bitset<543> seq; seq >>= 25; Or... vector<uint64_t> seq (9,0); seq >>= 25; // imagine the operator is overloaded correctly Basi...
[2 replies] Last: It will be about the same, unless the optimizer fails to figure out wh... (by Cubbi)
Why to avoid global variables
 
Hi, I recently finished a c++ class and the instructor mentioned this so many times, he insisted that we should try to avoid global variables because they co...
[9 replies] Last: I do not see what you are trying to argue. The point is you shouldn't... (by kbw)
August 2012 Pages: 1... 2526272829... 31
  Archived months: [jul2012] [sep2012]

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