General C++ Programming - February 2012 (Page 39)

getline()
 
My program retrieves lines of text from a file and gathers the last character in each line. But in my code, I can't seem to retrieve the last character of the l...
[no replies]
Help with Visual Studio 10
 
I am trying to compile a program for school in Visual Studio 2010. I have 5 different files. Some are .h and some .cpp. I tried using the build button, but it...
[1 reply] : Did you make it a project? If yes, press F7 (build hotkey). (by roberts)
by sigea
General STL data-structure design problem
 
Suppose I have a big pile of papers, and need to sort them into chapters, then sort the chapters into a book. But then suppose the above-mentioned book is re...
[3 replies] Last: A little food code for thought. If you have a compatible compiler, ... (by closed account 3hM2Nwbp)
Failure to correctly perform loop/input
 
The program runs just fine and works up until it reaches the first question "What is the capital city of Alabama?"... Instead of allowing user input, it immedia...
[4 replies] Last: Thanks. It worked, but I feel like a retard. I've never used that be... (by j3sus96)
"this" pointing to different address (1,2)
 
Hello people, this is the first time that I'm posting here and I need some help. I got a very weird situation. The output of this program: #include <io...
[21 replies] Last: not at all, thanks xd I just didn't understand: To do so you have... (by matheuscscp)
by Gldnbr
Can't use special characters?
 
I want to be able to output special characters to a console in C++. Some of the special characters include: ★, ∯, ♫, ♕, and so on. When I output the...
[7 replies] Last: I would say that in the most broad sense, a console is an example of... (by closed account 3hM2Nwbp)
Constructing a Class within another Class
 
Hi guys I have a problem which for I can't seem to find a work around that I'm happy with. I have two Classes, I'm trying to Construct the second class wi...
[1 reply] : Well, you asked for it: Don't use pragmas to link to libraries. Don'... (by hanst99)
by Arukas
Learning More
 
I consider myself well versed in C++ and have programming experience in C++. However, I want to know more about programming in C++. I want to know how to use ...
[4 replies] Last: http://oodesign.com/ Or, as already mentioned, Stroustrup. You could ... (by hanst99)
HELP!
 
This is a program I was told to create for one of my classes and I'm so lost! Write a program that will calculate both roots of a quadratic equation. The pro...
[17 replies] Last: That is beyond helpful!!! Thank ya'll so much!! (by ZBreezy)
Dynamic Memory aPPcrash
 
i'm working on my class project in data structure class. this is my code: #include <iostream> #include <string> using namespace std; main () { string...
[3 replies] Last: @ Moschops.. Thanks! big help.. =) @iHutch 105.. I'll remember that. =... (by yhangel)
TripleDESCryptoServiceProvider
 
I have an encryption class I use in c# that is almost working in c++. The code runs with out exception but there are two properties of the TripleDESCryptoServi...
[no replies]
This is so frustrating... Why does the 'head' change?
 
This is a code for singly linked list, I wanted the value of 'head' to point to the head of the linked list. And it seems that i have coded in that fashion only...
[7 replies] Last: I think what you want is something like this. void addNode(const... (by clanmjc)
by maddoc
Calling functions in a menu
 
Hi, I'm new to the board and I'm having trouble getting my functions to call properly as options in a menu I need the program to calculate the average rainfa...
[11 replies] Last: First of all, sorry for the late reply. I was writing from work earli... (by MrHutch)
by Arukas
Programs Talking to Each Other
 
I want to write a two different programs that talk to each other. They are on the same computer? How do I go about doing that? My understand the OS doesn't l...
[8 replies] Last: Thanks! (by Arukas)
Help with a program I have for class. Im stuck!
 
Okay so here's the question: Write a program that will calculate both roots of a quadratic equation. The program should ask the user to input a, b, and c and...
[2 replies] Last: Thanks! I got all that stuff down. The problem Im facing is with defin... (by bossdog27)
Writing data to a location in memory
 
So I am working on an assembly language program that gets input from the user and writes it to a buffer in memory. But first, I gotta write a higher level langu...
[2 replies] Last: If you want a direct analogy to storing a single byte, in C++ a char i... (by Moschops)
While loop difficulties
 
Task- Ask the user to enter a number between 5 and 8 (inclusive). Use a while loop to validate the choice. It should continue until the user puts the correct ...
[13 replies] Last: Then remove the both cout statements and just have the cin >> input. ... (by clanmjc)
Variable scope issues
 
I am writing an application that uses multiple .cpp and .h files and I want to use the same variable in multiple files. I tried declaring it in one header and i...
[1 reply] : Here's a thread covering the same thing: http://www.cplusplus.com/foru... (by Moschops)
Why does this not work?
 
I am making a deque with dummy head and tail pointers. Everything works until after I call the copy constructor and try to add something on the list. I have ste...
[6 replies] Last: Okay I got the copy constructor to work, all I had to do was remove th... (by Neb1000)
How can i change randomly accessed vector element?
 
We can use push_back() to push an element at the end of the vector. But if i want to change an element in the middle, i couldn't. I have made a custom class...
[3 replies] Last: OK, I think i got the it... (by Harry Potter)
February 2012 Pages: 1... 3738394041... 43
  Archived months: [jan2012] [mar2012]

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