General C++ Programming - March 2011 (Page 22)

Sorting a Linked list help
 
Hello I need to sort a linked list at insertion, I just can't figure out how to do it. any guidance in the right direction would be appreciated I have in...
[5 replies] Last: Wow thank you, that way seems so much easier than the way i was doing ... (by tkauffman2)
by v8n3t
Finding a Good Book for Understanding Memory and C++
 
Hello everyone, I am posting here because I am trying to find a book which is applicable to what I am trying to learn. I have been searching through Amazo...
[3 replies] Last: Accessing a process in memory, you would need to learn about Windows ... (by budman85)
by Divad
The n'th element of a set
 
I am using STL a lot especially set<int>. But very often I want to get the n'th element of the set, but set has no "at( int)" or "operator ". Ofcourse I could...
[4 replies] Last: What IMO is needed is some way to augment the containers. For this par... (by simeonz)
Priority Queue
 
I am losing data. somewhere and im not sure where. I am pretty sure it is in the pushqueue function.....it is suppose to put the symbols in order by its priorit...
[1 reply] : And could you not post the same topic multiple times? (by Zhuge)
reverse number arrangement in another array problem
 
The problem is : You are to read 10 numbers from a data file into an array named list. Create another 10 element array named Reversed that is to co...
[10 replies] Last: But you sill have not opened the file and read the numbers from the fi... (by buffbill)
Inheritance
 
class A { int n; public: virtual void Fun1(int no=10) { n = no; cout<<"A::Fun1"<<n; } }; class B : public A { int m; public: virtual ...
[4 replies] Last: Thanks All (by ankushnandan)
How would I clear the istream?
 
I have a problem where in my program, there is a place that calls the sleep function, and then afterwards it handles user input with _getch(). The problem I hav...
[2 replies] Last: Thanks! Works perfectly now! (by TheOtherIsland)
Linked list help
 
i have a program located at http://www.cplusplus.com/forum/beginner/38298/ and thought maybe this would be a better place for it and hopefully there are people ...
[no replies]
by zr870
Storing A sentence in a string variable
 
I tried to store a sentence as a string by using: string message; cin >> message; but that will only keep the first word, what is the best way to m...
[1 reply] : >> skips whitespace. Use getline instead: getline(cin, message); ... (by filipe)
Read series data from txt file
 
Dear forums members', I am really beginner, and just registered in this forum 10 minutes a go. I got C++ code from Japanese professor, and I want to modify thi...
[3 replies] Last: To read from a file, you'll probably want to use an ifstream or fstrea... (by Albatross)
Mixing Source Files
 
A quick and simple question. If I mixed C++ source files and C source files, what will happen? Will the C source files compile under C not C++? This is just ...
[3 replies] Last: If you mix C and C++ source files, you might want to pay attention to ... (by Albatross)
by Cyraxz
Coverting a file into a 2D array then displaying it, all 0s? (1,2)
 
Here is my code //Libarys used. #include "stdafx.h" #include <iostream> #include <iomanip> #include <conio.h> #include <fstream> //Using the standar...
[21 replies] Last: Thank you i see where i was going wrong now :) now i just need to chec... (by Cyraxz)
question about namespaces
 
hi about namespaces, I am defining a class in a separate file.h that I then #include-ing to the main file. when I define a namespace in the separate f...
[4 replies] Last: OpenCloseApp is defined in a header file that you include, right? The ... (by simeonz)
regexp to parse integers in a string
 
hi, does anyone quickly tell me what is the regular expression syntax to parse the 3 numbers in a string like below input: abcd(100,212,983) output: 3 stri...
[2 replies] Last: You want the capturedTexts () member function. http://doc.qt.nokia.co... (by Duthomhas)
how to make file reference within program.
 
Neophyte to C++. Trying to reference a specific filename from within the program as opposed to asking user to input file name. Keep compiler messages referrin...
[9 replies] Last: @jim3222 I like your use of bold. lol on another note, I kind of disl... (by ultifinitus)
by floof
Tricky template question
 
Hi members, I have a tricky (at least to me) question about templates. I am defining a template called Tuple that looks like: // File Tuple.h tem...
[2 replies] Last: Wow ! That was fast ! Thanks a bunch, i'll try that ASAP. (by floof)
Polar to Cartesian (1,2)
 
Polar to Cartesian #include <iostream> #include <fstream> #include <iomanip> #include <math.h> using namespace std; const double PI = 3.1415926...
[20 replies] Last: The 2D info that is generated from the laser line triangulation scanne... (by peter hurley)
by aatwo
Help with finding file length
 
Hey guys. I have a binary file that I am trying to determine the size of and I produced the following code to do so... FILE *file = fopen("binaryBuffer...
[1 reply] : Solved it! Opening the file in "rb" (read binary) was the way to go, r... (by aatwo)
Input from a File and reading out into a graph
 
I have been trying to get the top portion of my program to correctly read in 3 separate arrays from a .txt file and after trying a few different ways I cannot g...
[3 replies] Last: One problem with your file is that it's not that easy to parse since t... (by thokra)
insertion sort of a linked list of strings.
 
Hello guys, What I need to do is sort my linked list alphabetically by last name as I enter it into my list. I have it where you can enter into the list by the...
[4 replies] Last: Hi , Why are you not using structure instead of the class Address . ... (by bluecoder)
March 2011 Pages: 1... 2021222324... 31
  Archived months: [feb2011] [apr2011]

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