Beginners - November 2012 (Page 50)

inefficient code C++ problem
 
Hi guys this is my first post, i just got done programming this code for my class and when i showed it to my professor his only comment was that "it could be MU...
[3 replies] Last: thank you guys, that helps a lot. yes, i will go back and look it all ... (by audib7a4)
Globals
 
Eww i know, globals... I need a global to be accessible to multiple files Right now i have this //class.h #include "Globals.h" class foo { public: void Fu...
[3 replies] Last: Ive updated my code to //Globals.h enum Directions { Left, Right, No... (by Angeljruiz)
Visual Studio, zipping and uploading project folders
 
Hi All, I have finished my lab, it builds, and works like it is supposed to. I just zipped everything up and uploaded my lab to the dropbox, and since there ...
[no replies]
by chipp
bug
 
i want to create a program that has an output like: enter the number of asterisks: 9 ********* ******* ***** *** * *** ***** ******* ********* ...
[4 replies] Last: #include<iostream> #include<cstdlib> using namespace std; int main() ... (by Pter0dactyl)
Infinite looping problem... (help?)
 
Hey everyone, I'm working on my weekly assignment, and have run into a problem that so far no one has been able to help me solve. Basically what I'm doing is r...
[4 replies] Last: line = DASH40 exit inner loop back to top of outer loop set line = "em... (by fg109)
End of File not working Properly
 
This is a piece of a large program that im making. It is supposed to read names and grade from a file into arrays. However, it keeps running through all 100 loo...
[4 replies] Last: Thank you so much. It works now. (by austinwade912)
Programming Best Practices
 
Hi Everyone, I am trying to improve on how I write a program, I feel I may be picking up some bad habits from class and want to make sure I correct them. Here ...
[17 replies] Last: Also, I know this has to do exclusively with style, but I consider thi... (by Catfish2)
Generate user pressing key board event
 
Hello guys , I am backed. I need some guide. i want to write function in which user press event pressL . How can i do that ? One way is to get input u...
[1 reply] : can you write out what you done so far? (by Felicia123)
Counting words in a file
 
Hi guys. I'm on the verge of rage quitting and this is extremely frustring because I know EXACTLY what I need to do but I can't convey my thought into code. ...
[2 replies] Last: Thank you so much! I knew I was on the right lines. Thanks again you k... (by uperkurk)
Help with the switch statement. It wont build and I dont know what mistakes I made in the code. Please, help.
 
The problem is .... A company pays its employees as managers (who receive a fixed weekly salary), hourly workers (who receive a fixed hourly wage for up to ...
[2 replies] Last: Thank you for your help. I fixed it. And now am debugging it. :) Yay (by misslittle1)
multiples
 
My program asks a user to put in a number between 10 and 20. Then create a progression of the first number 10 multiples of that number (ie: 3, 6, 9, stopping at...
[1 reply] : That's because you are comparing counter to 20 which is the max value ... (by Raezzor)
loops
 
hello, I'm trying to figure out loops and so far, I think I'm being very inefficient. I'm trying to output this. 5 7 9 11 10 8 6 4 3 6 ...
[1 reply] : I did this: #include <iostream> using namespace std; int main() { ... (by Jikax)
no appropriate default constructor available
 
I am getting the following error when attempting to compile this program: cpp(59): error C2512: 'SodaMachine::DrinkInfo' : no appropriate default constructor...
[1 reply] : The object SodaMachine contains an array of DrinkInfo objects name... (by Moschops)
by BandK
please help :( simple sort problem
 
This is my code for sort char array...how to sort Z-A for (int i=0;i<br_unesenih_el;i++) for(int j=i;j<=br_unesenih_el;j++) if((strcmp(nazivi ,nazivi ))>0)...
[2 replies] Last: This not work. I try this. But thanks... (by BandK)
by lolwe
Help for beginner
 
Sorry my English is bad.Im beginner in programming with c++ and have some ?s 1. Write a program with a function main () and selecting a menu of functions: Ge...
[1 reply] : Anyone? (by lolwe)
[code]while ( scanf ("%lf ",&tem data) == 1)[/code]
 
while ( scanf ("%lf ",&tem_data) == 1) I dont understand what this part of code means :( Help
[1 reply] : scanf returns a value that represents the number values read correctly... (by TheIdeasMan)
Issues with a generic method
 
Okay, so I've been reading the relevant documentation and I was fairly sure that I was on the right track. template <class T> bool ainlistb(T a, list<T> b) { ...
[no replies]
Inventory program help.
 
For this program, I have to create an Inventory class with the private member variables itemNumber, quantity, cost, and totalCost. I have to have public functio...
[3 replies] Last: Both of your suggestions where a great help, thank you both so much. (by Dylan2012)
pass by reference
 
hi. i'm having some difficulty grasping this!! can you provide an example, or two, which explain the following: the pass by reference method copies the address ...
[11 replies] Last: yes lets not be throwing points around thats what they do at dream in ... (by devonrevenge)
by nahla
Command Line Arguments and flags
 
How would I go about using command line arguments in order to compare two different text files that will output the following?: differ -a file1.txt file2.tx...
[2 replies] Last: You can't do that with a switch . And you are comparing pointers, no ... (by ne555)
November 2012 Pages: 1... 4849505152... 75
  Archived months: [oct2012] [dec2012]

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