Beginners - February 2012 (Page 4)

double linked list, removeAtTail busted?
 
I can't figure out what is going on with this bit of code. I'm building a double linked list. when i call this function inside my find/remove i get a seg fa...
[7 replies] Last: Well, removeFirstOccurrence() looks very wrong. On line 29 you set the... (by coder777)
convert uppercase from a string
 
I'm new to c++ and i have an assignment that's need to be done. i need a to convert the word "by" to upper case. below is what i've gotten so far but i cant s...
[7 replies] Last: nevermind i got it... btw, why you don't use this? cout << "\n in... (by chipp)
Appending to arrays
 
I'm reading in data buffers from multiple files and I'd like to append data. I'm doing something like this to read the data: unsigned long data_size; unsign...
[3 replies] Last: You might want to look at the data() method of std::vector .... (by cire)
by kw1991
random number generator
 
I need to make a random number generator that I will be using for student id's. when the number is generated I want to put it in a hashtable. Its getting the r...
[8 replies] Last: http://programsplusplus.blogspot.in/2012/01/3-program-to-generate-rand... (by fatal1ty92)
Calculating primes between 1 and 1000
 
Hello, I'm working on a class assignment. This function calculates numbers between 1 and 1000 for prime numbers. The error I'm having is variable count is not ...
[4 replies] Last: Obviously count should be defined and initialized to 0 at the start of... (by cire)
Question on deleting pointers
 
Hi, I have this following code snippet. I need help in determining what is the right place to call delete and why? MyClass1 tMyClass1; for (int i = 0; i ...
[5 replies] Last: (Don't forget to check for empty containers. Deleting nullptrs is gene... (by Gaminic)
by john99
Sorting in alphabetic order
 
Hello, Maybe someone help me. I try to sort names in alphabetic order and get the folowing output for example: Altius Brasil ball chiken. How can I sort name...
[1 reply] : Rolling your own comparison function and using that is probably the ea... (by cire)
Multiple inputs....
 
So I am writing this program that is supposed to take input from the user, on how many students are in a section, and calculate their grades accordingly. He...
[2 replies] Last: As ResidentBiscuit said, you can use a std::vector to store the scores... (by cire)
Searching a file
 
hey guys! My first post! yay for me haha... I am taking a c++ class this semester and I am having trouble with an assignment. You have probably seen it b...
[2 replies] Last: When reading in, you don't check to see that you have an address (a to... (by cire)
Stroustrup PPP ch.5 : Bulls and Cows
 
Hi everyone! I have no previous programming experience and am currently teaching myself C++ through the Stroustrup beginners book, and hit a bit of a snag. O...
[1 reply] : A "bull" is a guess that's correct and in the right position in seque... (by cire)
Passing Functions as arguments(help)
 
I getting some errors when trying to pass in some functions as arguments. Heres the Code, ive pointed out the key parts to the program which im having trouble(s...
[7 replies] Last: Your prototype parameters don't match the actual signature of the func... (by Bench82)
Reading from file to vectors (warning, grammer fail)
 
Hello all, So...here we go. I have a text file that that looks a lot like this: FirstName LastName SID Quiz1 Quiz2 Quiz3...Quiz6 HW1...HW10 ...
[1 reply] : Do something like this: std::vector<std::string> v; while(ist.good()) ... (by coder777)
tic tac toe
 
Hello! So in my C++ class we've just finished arrays and we got a rather interesting challenge. In this challenge, we're supposed to write a program that a...
[1 reply] : if you have a 2 dimensional array you can check it like so: if((a ... (by coder777)
automatically end program error
 
#include <iostream> #include <string> #include <windows.h> #include <conio.h> using namespace std; wronginput(), pwun(), pwheader(); string pwpw(); ...
[4 replies] Last: Note that <conio.h> is a deprecated header. Wazzak ... (by closed account zb0S216C)
by pzling
Compiler not recognising constructor?
 
Hi I'm just finishing up an exercise and creating an object in the interface. My head is probably rather muddled but I'm baffled as to why the compiler is no...
[5 replies] Last: it just points to the start of the argument list... it doesn't know wi... (by Jikax)
Big Numbers
 
I'm writing a factoring program and need to handle very large integers (larger that intmax). What is the best library to use for handling numbers like this? I h...
[5 replies] Last: I think in C++ you can create your own data type, can't you? (by Baso)
Problems with coding a basic calculator
 
I'm taking a class in "Introduction to Programming with C++". It is the very first experience I have ever had with programming and so far I'm less than thrilled...
[6 replies] Last: I was finally able to figure out the problem I was having and finally ... (by closed account iT7X92yv)
by TomCW
'Find and Replace' Problem
 
Hi everyone, Before I start this problem/task, I thought I'd touch base here to get some suggestions in case I start on the wrong track. This is the prob...
[1 reply] : Don't replace things. What if Idioma.getTexto("print") is longer than ... (by hamsterman)
LinkedQueue
 
Okay this is a homework question, but my problem is that I really dont know what to do basically I need to overload the ostream operator, the problem being i...
[1 reply] : I cant use the ll.getHead() because LinkedList ll is private. To avoi... (by hamsterman)
Please help remove errors from the program
 
anybody help me remove the errors from the following C++ program ??? Please re post the code after the errors have been removed. People please help me.. i dont ...
[12 replies] Last: What course are you even on? - If it isn't a programming one, why have... (by WhiteWind)
February 2012 Pages: 123456... 64
  Archived months: [jan2012] [mar2012]

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