Beginners - December 2014 (Page 39)

by reiamg
strcmp confusion
 
Question: Prof. Alban Azizaj is giving lesson to two classes. He has 2 students in one class and three students in the other class. Read the student information...
[2 replies] Last: Question: Prof. Alban Azizaj is giving lesson to two classes. He has 2... (by reiamg)
Arrays in functions
 
Hey all, I just finished with my code to rearrange any given array and Im trying to clean up my code by putting it into a function. I just need a tip on how to...
[3 replies] Last: Update: I got crammed doing a bunch of last minute programs because m... (by specter113)
Fibonacci numbers
 
Ok, Im stuck on the logic of this program. I need to find the nth Fibonacci number for any positive integer n that the user entered. What does the nth number me...
[4 replies] Last: Hey just a quick update I figured it out finally on what you guys were... (by specter113)
Need help with Switch statement
 
I cannot seem to get this switch statement to work, I want there to be a condition that prompts the user to enter "yes" or "no" then using a switch statement if...
[1 reply] : There is a difference between a character and a string char answer; ... (by shadowCODE)
random number gen/ SLD
 
im making a SDL game and i am having trouble with my random number generator? when i run it said that time was not declared? on line 15 #include <cstdlib> #i...
[2 replies] Last: oh ok thanks @wildblue yeah on netbeans you dont haft to add that tha... (by freecody24)
How declare ?
 
Hi, I´m new in C and i´m trying to do this XOR; 2 hexadecimal numbers like: 0x CC 51 F2 75 13 E8 5C EB xor 0x 40 95 8E 2C 54 07 FA FF (0x FF FF FF FF F...
[4 replies] Last: Thanks, worked ! [ ]´s (by pomodoro)
Explain the output?
 
Can someone please explain the output of this code? Please and thank you #include <iostream> #include <ctime> #include <cstdlib> #include <iomanip> u...
[9 replies] Last: ahhhhh im such an idiot. thank you guys (by alielsaadi)
Complete testing of sort methods
 
I just recently completed a small project using a few different sorting methods on sets of random data and while doing some research on the sorting methods, I b...
[no replies]
character movement in a dungeon crawler
 
Hello everyone. I'm having some trouble with "identifier is undefined" in my BuildLevel function. I can get rid of that issue by copying the first four lines of...
[2 replies] Last: Your four variables in your main function are only in the scope of the... (by aarnold404)
While loop with yes or no statements
 
Hello, Im trying to write this code where it asks to enter a guests name, after entering it, it asks you if you'd like to add another, if you put yes it needs t...
[5 replies] Last: Here is a modified example of your code. If you need me to explain any... (by deathslice)
by BovaC
Need beginner help please.
 
Hello, I am new to C++ and I am,stuck on this question I received from my professor, does anyone mind helping me out? Thank you in advance. Write a program t...
[2 replies] Last: Well to give some tips, from what I see you would need a string array?... (by chick3n13)
*update* Need assistance with array loop..
 
update: the last section has been fixed.
[3 replies] Last: bump Like I said, I would prefer an explanation and tips. Thanks agai... (by chick3n13)
Please explain how this array of structures selection sort works
 
After a few hours of trial and error, I was able to figure out how to write the program, but I still don't understand how I sorted the structures within the arr...
[5 replies] Last: Thanks again. You have very helpful. (by jumpinmp)
Print Method not working
 
So I have to write a program that picks up item ID, amount sold, amount remaining from a txt file: 501024BMU 895 743 455559SKK 764 234 706756EUU 687 730 A...
[4 replies] Last: thank you so much... oh my god I was stuck on this for hours! I feel s... (by junmyeon)
using a std::mulimap instead of a std::map
 
I need to use a multimap instead of a map. int main() { multimap<string, vector<pair<string, unsigned>>> families; // Holds families' names string...
[4 replies] Last: I know, but it's an exercise from a book I'm learning with and its a l... (by closed account EwCjE3v7)
Can you spot the error?
 
I've been refreshing my mind on the various string functions and I've come across this code example on the internet that says that there's a bug in this code. I...
[1 reply] : If the string ends with space and this space is the only one, then po... (by MiiNiPaa)
by Matas
LCM
 
I need to find LCM of x unknown numbers. I scan x numbers from a file. I know only an amount of them. Please share your advices :)
[2 replies] Last: http://en.wikipedia.org/wiki/Least_common_multiple#A_simple_algorithm (by MiiNiPaa)
Difference between size_t and size_type
 
here are two code example that I've found. string str; for(string::size_type i=0; i < str.length(); i++) { str = toupper (str ); } ...
[2 replies] Last: You can think about std::size_t as ::size_type for C arrays. ... (by MiiNiPaa)
Refreshing console screen.
 
I've created a game quiz but I'm trying to implement a timer. However, once the user is prompted for an answer, the timer obviously doesn't count down. Is th...
[no replies]
Converting to a Template
 
I have a question that I have been trying to figure out for a few days, I don't really understand how to make this program compile. Firstly the program had all ...
[5 replies] Last: oh I see, that makes sense. When I switched the int to T, I now have ... (by DEnumber50)
December 2014 Pages: 1... 3738394041... 55
  Archived months: [nov2014] [jan2015]

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