General C++ Programming - April 2013 (Page 40)

by zoori
vector with strings and integers
 
Hello, I have a file where the first column shows letters, second column shows numbers. How could I make it to print everything exactly how it is in the file ...
[13 replies] Last: Could you post your current code? Also, could you copy and paste the o... (by LB)
Simple way to hold numbers with a lot of decimal numbers
 
I have a task to hold a number like 4.0000000000000000199e+30 and, in a variable like long double (the largest of the data type) doesn't hold the whole number, ...
[1 reply] : Perhaps no longer simple, but could you use a string? (by krakow10)
How does SDL load bit map images?
 
I don't mean how do I load a bmp, I mean how does SDL manage to do this?
[2 replies] Last: Ok thanks, I didn't want to try to find it in the source code at first... (by Austin J)
delet the linenumber
 
I have some problem in using the fstream. my objective is to delet the line number : such as a line 1.#include <iostream> will be converted to #include <iostrea...
[3 replies] Last: I think this would work.thanks int x; char decimal; string line; whi... (by DANNY123)
My program crashes can anyone please help.
 
My program crashes as soon as it is run. I am using windows 7 home premium, IDE - Bloodshed dev c++ Design and implement a c++ class called "Module" that h...
[1 reply] : The problem is that you are creating zero-size arrays and then you try... (by Peter87)
Using remove_if
 
Hi everyone, I have a map, whose pair is a string (key) and a simple class. I want to remove all items whose key string ends with a given number. I thought abo...
[4 replies] Last: Thanks JLBorges, it worked for what I need :) Thanks for the tip, L B (by leoalvesmachado)
spliting words
 
how can i display words form a long sentence. example :(lets assume that if u find two spaces that is word) INPUT:the Indian school boys are very good comp...
[1 reply] : yes, the stream does not take the number of delimiter into account. i... (by coder777)
Tail recursion
 
Can someone please explain to me how tail recursion is advantageous over traditional recursion ?
[1 reply] : Good chance of compile-time optimization. (by MiiNiPaa)
delete this
 
Hi, void TestDeleteThis::deleteThisObject() { cout << "into delete method1" << endl; delete this; } int main(){ TestDeleteThis td1; td1.i1 ...
[4 replies] Last: http://www.parashift.com/c++-faq/delete-this.html http://yosefk.com/c+... (by Catfish3)
by AceK
CAN SOMEBODY EXPLAIN HOW A MEMENTO DESIGN PATTERN REALLY WORKS?
 
Hi there, I'm struggling to understand the concept of a memento design pattern, can somebody explain to me in the form of code. And please give real life situat...
[2 replies] Last: Thank you very much JLborges, now I understand it. (by AceK)
Selecting a host for C++ CGI
 
When I look at a webhosting company's website,it is written,for example: ASP.net Yes CGI-BIN Yes Phyton Yes Php Yes Does it mean ...
[2 replies] Last: Thanks for your answer. (by Awareness)
Sorting Numbers from file
 
hey there. I am looking for some help. I have been working on this program for days now and for some reason my program will not write to my third file. It will ...
[10 replies] Last: Thank you for your help but I got my program to work in a completely d... (by struzy629)
by AceK
CODE TO FIND PRIME NUMBERS NOT WORKING
 
Hi there, the code below is suppose to output all the prime numbers between the values of startNum and endNum variables. but its not working correctly instead i...
[6 replies] Last: the code doen't work, The code works just fine. It's the algorith... (by cire)
by mary2
Need help with this pls!!!!! Cant figure it out
 
#include <iostream> #include <iomanip> #include <cstdlib> #include <cstring> #include <ctime> #include <string.h> #include <time.h> using namespace std; con...
[4 replies] Last: http://www.cplusplus.com/forum/articles/1295/ Please provide a better ... (by Zaita)
How to make a loop until user says to break
 
Hi there, I'm not very good in programming. All I know is what I took from forums... I'm making a program for a MMO I play. It calculates the cash and res...
[8 replies] Last: > I still think it's more complex, but if that's the way it should wor... (by JLBorges)
problem with gravity
 
im trying to make a program that simulates gravity as if your mouse pointer was a large object, and particles were gravitating around it. but when i run it, it ...
[9 replies] Last: yay (by greenleaf800073)
by qingze
Problem with generate two txt file in one program
 
I try to write my data into two different files and i just use something like this ofstream myfile; myfile.open("phase 1.txt"); if (myfile.is_open()) { ...
[3 replies] Last: do you have #include <fstream>? you should also do myfile.open("pha... (by greenleaf800073)
Cant figure out how to let the user modify the counts.
 
After the data is in the array, prompt the user to modify the array by inputting a species name and a count. If the species is not in the array, print a message...
[3 replies] Last: Ok Then. I'd look at easier ways to write them: #include <map> #incl... (by Zaita)
a problem in the stack
 
#include <iostream> #include <string> #include <stack> using namespace std; stack<string> A; string str ("ilove*youtube*cplusplus"); void stock(strin...
[6 replies] Last: yes, i notice that, thanks for your advise. (by DANNY123)
Apparently, structures can't have pointers...
 
Can you guys spot what's wrong with my code? I've managed to single out in the program where exactly the program crashes but I can't figure out why it crashes.....
[7 replies] Last: You can use classes in C? No. C does not have classes. ne555 was ... (by Disch)
April 2013 Pages: 1... 3839404142... 53
  Archived months: [mar2013] [may2013]

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