Beginners - December 2013 (Page 47)

Payroll Assignment
 
The assignment is: Write a program that uses the following arrays: • empId: an array of seven long integers to hold employee identification numbers. The ...
[no replies]
by mjyz
Reading First and Last Name from File
 
everything works when I try to read from the file when I remove the Jr. from the name . How can I read the last name as Smith Jr. using this input file? I can't...
[3 replies] Last: It works only for the names that have for ex. Jr. what if a name just ... (by mjyz)
Void function not printing
 
Hi, I have written a program that is supposed to output the results of an election between five candidates. The void function I have written to print the result...
[2 replies] Last: ah... yeah. It's not going to do anything with that loop condition. It... (by glicerene)
problem printing a vector with a loop
 
why am i getting a seg fault from this code?? bit_vector decoded_lcw_vec(corrected_array, corrected_array + sizeof corrected_array / sizeof corrected_arra...
[6 replies] Last: using cout instead of printf() gets the data on the screen. (by density)
Printing with for loops
 
lets say i have an array with 240 bits and i want to print the values in ordinals that are not consecutive. like: for(i=80; i<86; i++) printf("%d"...
[2 replies] Last: nice! Thanks a bunch!! (by density)
by mjyz
How To Print Hyphens on ID Number?
 
How can I get an ID number read from a file to print out as xxx-xx-xxxx ? it is read as numbers from the file but how can I get it to print with hyphens using...
[4 replies] Last: Thanks guys (by mjyz)
dynamic memory allocation for charecter
 
i have to just do dynamic memory allocation for char without asking for no of charecters users want... #include <iostream> int main () { char* a; gets(...
[no replies]
Errors in class
 
I am almost done with a project but I keep getting these errors when I compile. They occur in both of my classes and this is a barrier that is keeping me from f...
[1 reply] : Why are you using class std::A Why not just try class A That's t... (by dmpaul26)
Printing decimal numbers, but not zeros
 
Hi! I'm working on a little hobby project outside of my C++ class where I'm trying to experiment with some ideas we haven't used in class (So it's not homewo...
[no replies]
Class isn't returning.
 
My code is running fine, but when I call the return function in my header file nothing outputs. Any comments would be very helpful. Header File #ifndef...
[5 replies] Last: One more thing to mention. Headers are mainly for prototypes and only ... (by giblit)
by dylanv
rand() generating numbers outside of expected range
 
Why does this code generate values outside of the expected range of 33 to 126? int vi; int i; for (i = 0; i < 20; i++) { srand(time(0)); ...
[4 replies] Last: @ aleonard: Thank you for the clarification. When I run this code to... (by dylanv)
difference with colon and semicolon.
 
What the difference between this code : #include<iostream> using namespace std; void main(){ char a('1'); char b('2'); char c('3'); char d('...
[2 replies] Last: thx for helping bro (by hans2311)
Unresolved externals error - what is that?
 
My code will compile, but it will not debug. I receive 2 errors. Error 2 error LNK1120: 1 unresolved externals Error 1 error LNK2019: unresolved exte...
[6 replies] Last: THANKS!! (by jlpurnell)
Using a bubble sort to alphabetize words.
 
Hello, I am currently working on a program that allows the user to insert a list of a words into an array that ends when the user enters a period. The program i...
[no replies]
Beginner c++ need help with arrays
 
Hello everyone. I'm new here and I have a code that I need help with. I'm currently enrolled in a intro C++ course in college and I am feeling very lost. As o...
[2 replies] Last: Thank you! That worked! But, for some reason, I am able to get an out... (by Ali9289)
How do I copy data from a map to a multiset?
 
What I am trying to do: Counting the frequency of words occurring in a text file and printing them in order of frequency. I have successfully solved the problem...
[1 reply] : Why use multiset? What is wrong with set? Also you never declared a va... (by Smac89)
How to add a node that will always stay defined?
 
Hello, I am having a problem with inputting a variable type Tree as a function parameter. When I call these functions on the variable, it gives me 0...
[no replies]
by mjyz
Need help with Delete Record function
 
I've been trying to get my delete function to work but it doesn't. Can someone help me with this. It deletes the first record instead of the record I search for...
[2 replies] Last: Makes sense, it worked. thank you so much ! (by mjyz)
Couple of logical errors-Blackjack
 
Here's the blackjack game I wrote. Any help is greatly appreciated. So one problem with the game is if both players choose to stand the program won't end an...
[2 replies] Last: Yeah my professor isn't too fond of those either. I was gonna remove t... (by antwon128)
two dimmensional arrays
 
Hello guys, Im currently doing a project for school. Its basically a Cash register that gains data from an input file. In the input file, the first data is the ...
[15 replies] Last: 1. Make sure there is data in the input file. 2. Make sure you are acc... (by Tresky)
December 2013 Pages: 1... 4546474849... 69
  Archived months: [nov2013] [jan2014]

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