General C++ Programming - November 2011 (Page 3)

Pointer and String interaction
 
Is there a way for me to have a user enter a string, then assign a dynamic array to all the locations where the char values of the string are stored in order to...
[1 reply] : Not sure what you mean. The string class has methods to get individual... (by bbgst)
Floating Point Precision Questions
 
Hi all, I think the one area I lack knowledge in most is when it comes to floating point precision. I don't understand the following code: #include...
[2 replies] Last: precise precision Nice. Floating point values are stored as pairs of... (by helios)
writing a program using functions.
 
hi!! I'm in need of major homework help. I have to write a program using functions that basically outputs a phone bill to the monitor. I honestly can't seem to ...
[4 replies] Last: well my professor gave me this as in outline for what I should do with... (by aswmack)
Fib
 
Hi Guys I am fairly new to C++ and although I have been doing pretty well, I am now stuck on a certain code. The problem given to us is stating : Write...
[2 replies] Last: I would also recommend dynamically initialized arrays ;) (by LB)
Task: Write a C++ program !
 
Dear everybody I am a newcomer and unfortunately, I have absolutely no idea in terms of the C++ programming language. But I already know what the structure ...
[2 replies] Last: Thank you for you response, now the basic staff is clear! I hope tha... (by martineu)
help with rpg code
 
My header is a collection of all neccesary headers and using namespace std; When I run this, it always says that my command is invalid no matter what I write. ...
[7 replies] Last: duh i am not at my smartest tonite i forgot to delete the second one w... (by Aramil of Elixia)
error using ifstream
 
I thought I knew how to do this, but evidently not. Here's the offending code: #include <iostream> #include <fstream> using namespace std; . . . ifst...
[6 replies] Last: I realize that I've marked this as solved, but...I'd like to ask a fol... (by mzimmers)
Help with Assignment
 
Hello, I really need help with this assignment and don't quite know how to create the source code for it. Here's what I need to do: Hi, I'm really new at ...
[2 replies] Last: I'm sorry, I just didn't know that forum to post it in. (by milleniumgirl199)
Binary File Programming Problem
 
Basically i want to write user inputs to a binary file using C++ streams. Although these programs compile successfully, it doesn't write a record to my binary f...
[9 replies] Last: How i can split a string that is entered from standart input in main f... (by zulfikar)
by Johnb5
HELP!!
 
I've only gotten some of this program done so bear with me but can anyone assist me with this??? ***Write a program that will let you continuously display ...
[no replies]
Sorting arrays, please help me
 
I came here for help with writing my program. Instead I got all sorts of rude comments. I took Aramil's suggestion and indented my program. Still people are com...
[5 replies] Last: OP: I can't display the sorted version of my array. I tried to call ... (by Moschops)
Input values into an array
 
Hello Can someone help me with this please. This is not the full code just small aspects. I have array a ={0}; when i try this int i cin >> a ...
[3 replies] Last: @bbgst int a = {0}; as well as simply int a = {}; initialize al... (by Cubbi)
nested lists, how to insert into a specific list
 
hi, I have a structure list<list<int> > mylist; and an int that tells me into which outer list I should insert some other value. e.g.: int i = 3; now, ...
[4 replies] Last: ok thanks, it's working now. (by bibiana)
STL version of boost::circular_buffer??
 
What can I use from the STL to replicate the boost::circular_buffer?? For example I have the following: MyStruct{ int blah; int blahblah; } typedef b...
[3 replies] Last: I have used a vector and with slight modification to my code it does m... (by wanting2learn)
An obvious behavior, simple mean code
 
uuuuuuuuuuuuuuu
[8 replies] Last: OP Hello, I have the next code which calculate mean of an matrix. al... (by Moschops)
by j2l
openssl/des.h
 
Hello, I want to create a program that encrypts a text file using DES. I am using the openssl/des.h library but I got stuck and I can't move forward anymore. H...
[3 replies] Last: The code you posted above have a number of problems in addition to the... (by andywestken)
Line intersection with a triangle.
 
Hi, I am trying to make an algorithm that can determine the intersection point between a line formed by 2 points A(x1,y1,z1) and B(x2,y2,z2) and a triangle CDE...
[7 replies] Last: Sorry, I made a mistake in mine The matrix M is constructed by writin... (by mik2718)
How do I: string class operator+
 
As we know that operation like int i=1, j=2; i+j; will not change the "i" or "j" variables' value because it only change for a temporary when the statement is...
[7 replies] Last: If it is not to late, you should make the argument to your operator+ m... (by trailfrenzy)
Help with iterators.
 
Hi. Im having a problem with a function in my class that uses vectors and iterators. I know it is this function as when I comment it out it works fine. I am try...
[14 replies] Last: When incrementing an iterator use the prefix ++ instead of the postfix... (by trailfrenzy)
help with break
 
So i was reading a tutorial on c++ (actually the one from this site) because you never know what you will find that you didn't know before, and I came across a ...
[7 replies] Last: thank you. (by Aramil of Elixia)
November 2011 Pages: 12345... 47
  Archived months: [oct2011] [dec2011]

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