General C++ Programming - March 2012 (Page 30)

vector value to another vector
 
I have been trying to figure out how to put the nameslist vector value that is randomly pulled and put it in pulled names thanks string names ={"Tina","Aa...
[1 reply] : vector<string> pullednames(nameslong); creates a vector which alread... (by hamsterman)
Array of strings not working
 
I don't know much about c++, so if I could get some ideas it would be good. I need a program that reads some number of strings that Iam not aware of and also s...
[1 reply] : Arrays can only be created with a constant value. Try this: const ... (by Stewbond)
Outputting specific contents of a file to another file
 
I'm doing an assignment for school which is to simulate the grep command in C++. We are to take in a word to search, an input file to search through, and output...
[1 reply] : What is that while loops supposed to do. line never changes in it, so ... (by hamsterman)
by roryn1
Converting a number into a word (Not 0 to zero)
 
Hello, I'm very new to C++, only on my second month of learning it. I'm trying to create a program that can basically take a barcode number like "3343456" ...
[3 replies] Last: You need to declare item higher up in the program. Before you set item... (by Need4Sleep)
multiple averages into an existing array
 
I have a program that should find the average of each row and then input into the existing array filled with student scores. I have the code for finding the ave...
[1 reply] : One way is to declare an array as 2 dimensions of say 10 rows and 5 co... (by buffbill)
Reading an encoded AAC file
 
Hey, So I want to parse an encoded AAC file. Every time I parse it and print the output I get junk values. So I have no real way of parsing it. I wanted to k...
[1 reply] : ... (by havok13888)
Creating iterator for my stack
 
I'm trying to create some iterators for my class stack so that I can accomplish something like this when trying to loop through my stack: for(StackIterat...
[1 reply] : you can't return a 'T' pointer from a function that return a 'StackIte... (by Vins3Xtreme)
by adn258
A Little Trouble with Deference operator?
 
#include <iostream> using namespace std; void add(int& a, int& b) { a+=2; b+=2; } int main() { int x = 2; int y = 9; add(x,y); cout << ...
[5 replies] Last: Thanks guys that makes sense now :) (by adn258)
Timer Manager
 
Hello, I'm working on a little side project. I'd like to be able to have a bunch of timers, of different lengths, and count them down. I'd like it to allow t...
[no replies]
Initialize from a File
 
hello everyone, Probably a really basic question, but I am still begging here and can't seem to figure it out.. My teacher is asking me to create a program ...
[1 reply] : for example in the file we have: A++ 110 110 A+ 100 109 A 90 99 B 80... (by Vins3Xtreme)
Add the variances of 2 sets of independent random variables?
 
My question isn’t what you’d expect from a simple web search. Let’s say that you throw a fair die (singular form of dice) 4 times and get {3, 4, 2, 3}. ...
[2 replies] Last: The link that you gave me was a good start. http://en.wikipedia.org/w... (by Arctic Inferno)
Pointer problem!
 
Hi guys, how are you? Im new here so if i have to introduce myself somewhere in the forum just tell me! I'm having a little problem with my code. The sit...
[4 replies] Last: Hi roberts! thanks for your reply and your time! When the socket class... (by MrAnderson)
pointing to an element inside an array
 
If I have an array of const doubles and I want to create a pointer which points to the nth element in the array, how would I do this? What about the 0th element...
[6 replies] Last: [quote=hopesfall]If I have an array of const doubles and I want to cre... (by closed account zb0S216C)
create a file
 
hello everyone. i have some prbles creating a file i wnat the file show what i see in the C++ scream and it only show one number how can i do that my file wi...
[2 replies] Last: thank you (by j0semigue1)
Avoiding loss of precision in casting
 
Hey Everyone, I am currently learning C++, and I had this question about casting. Example char c = 1000; in the example above, 1000 will be impl...
[1 reply] : You'll get a compile time warning on a narrowing conversion. You real... (by kbw)
cin.ignore () not working
 
Hi, There was an issue about cin.ignore() method some time ago in this forum, but the thread is closed now. At the time, the question was so vague that the re...
[2 replies] Last: Yeah, long double main, you are rigth. Thanks a lot for your quick ans... (by fernando)
by patcho
Putting An Array in the Heap
 
Hi all, I am writing some code that requires me to create a few huge arrays of double precession floating points, too large to be put on the stack (at least ...
[3 replies] Last: Use standard container std::vector<double> (by vlad from moscow)
10x10 addition table tweeking
 
Ok, I have this code: for (rows=0; rows < 11; rows++) { for (cols=0; cols < 11; cols++) { sum = rows + cols; if (sum < 10)...
[1 reply] : Yes there is, rsh0117.. for (int rows=0; rows < 11; rows++) { for (i... (by whitenite1)
by Ahmed1
problem in list sorting
 
hello there, I'm trying to sort a list according to the "length" paramter in ascending order, which represents the third coloumn. List elements are read fr...
[2 replies] Last: Well, the actual question is that my bubble sorting method did not wor... (by Ahmed1)
linked lists
 
The following messege is not allowing me to compile my header file: 1>e:\program_5\program_5\word.cpp(200): fatal error C1010: unexpected end of file while loo...
[2 replies] Last: This user has copied and pasted the same question 4 times now Duplica... (by Stewbond)
March 2012 Pages: 1... 2829303132... 49
  Archived months: [feb2012] [apr2012]

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