Beginners - November 2014 (Page 19)

using nested loopsto create a pattern
 
You program will get the width of the base of the triangle from the user. You should onlyneed a fewcout statementstoactually buildthe triangle. Depending on how...
[no replies]
by thor36
What is wrong with my for loop ? Segmentation fault
 
Greetings all. After running my code, it stops when it comes to this part with the for loop. My for loop basically looks like this : double CurrentTime =...
[8 replies] Last: Thank you for suggestion. If I comment out the entire for loop, it get... (by thor36)
Multiple misuses and misunderstandings in code syntax
 
Hello, I am "Nicholas" from IRC, I often "annoy" people with my overbugged code, guys at IRC were solving another problem so I felt uncomfortable to interrupt, ...
[4 replies] Last: Ok so you want to have it beep as well. an other tip i am going to giv... (by Precious roy)
by aggsyb
Basic understanding of class implementation
 
So I have created a few classes which are really useful to me , from what I gather "best practice" is to prototype your functions your class will have , obvious...
[1 reply] : 1) Theoretical explanation: this is done to separate interface and do ... (by MiiNiPaa)
how to print my information
 
in my c++ code i want show my zipcode when i run it I write like that but there is error said "getZipcode" was not declared in the scope i am sure my there is s...
[3 replies] Last: [quote=qingcheng]no i did not call it in my getzicode function how do ... (by AbstractionAnon)
by Lucy2
Ask user for 3 integers
 
I need to prompt the user for two positive integers; then prompt for a number between those numbers. If the number entered is between the first two, then ...
[5 replies] Last: Thanks both danghotties and jasonwynn10. This was very helpful! One ... (by Lucy2)
Anyone know how to fix these errors.
 
Hello, I finished typing in a code for a bubble sort for an array. I keep getting errors saying "definition of i is ignored" and "definition of i is used". Not ...
[2 replies] Last: You don't have an open { or an end } for your two for loops. (by joshhenry95)
if Statement not recognised.
 
Within my int main () has an if statement that suppose to add 1, 2 or 3 to a variable named anicrds and then add that to a either player one or player two total...
[2 replies] Last: add a breakpoint on the line where your 'dodgy' if statement is. when ... (by mutexe)
const char
 
Hi gurus, what does const char*argv means what is actually happening here ? I have encountered another example in our site explaining difference between ...
[2 replies] Last: usually that argv in main's parameter, use to store parameter that gi... (by LendraDwi)
by Jweim
Trouble with a function
 
I'm writing this program to take in the scores from contestants. There are 5 judges, so I'm accumulating the judges scores and sending them to the function to c...
[7 replies] Last: This here will find the max in the array int findHighest (int array ... (by danghotties)
Prim's algorithm and binary heap
 
How does prim's algorithm use a binary heap if using an adjacency matrix?
[no replies]
Listing contents of a file
 
Hello guys I am not sure how hard or easy this is because if I am being honest I have no idea how to start it. I could do this in a script with bash :D but tha...
[2 replies] Last: Thank you @mutexe (by cory244)
Code works but I do not know why. Array problem
 
I had to write a code that took ten numbers from the user, put them in an array. The program would then return highest number. I did a little research and I fou...
[2 replies] Last: That makes sense. Just wish I had a firmer grasp on general programmin... (by Endymion)
Adjacency Matrix
 
Hi, I have an input file with string names of vertices to make a graph (adjacency matrix). How can I make it so the string names correspond to numbers to go wit...
[6 replies] Last: Well, replace int with std::string. (by Duthomhas)
Help me with this program
 
This is what I have to do: Write and test a program that collects the total monthly rainfall for a one year period (12 months). The program should calculate a...
[3 replies] Last: Thank you so much guys! I really appreciate it! (by JayJay007)
by paligq
Generating random numbers
 
I keep getting invalid operands to binary expression ('double' and 'double'). I tried to solve it myself, but no cigar. What I am trying to do is populate an ...
[3 replies] Last: Thank you guys both for your help it helped me solve it. (by paligq)
Can't seem to understand this array.
 
I need to create a function call convertToDecimal. This will then take an int array { 3, 2, 4 } and a length of the array, and will return a single integer wher...
[3 replies] Last: Just a hint for(int i=0;i<5:i++){ num=pow(10,(i-1)) } Now you... (by giblit)
undefined reference error in class
 
I'm trying to take the program slow aka building it slow so this is what I have so far. I receive an error : undefined reference to Player Player (char const,...
[1 reply] : Update to code, realized I missing constructors. Now the issue lies in... (by akrutke)
arrays in battleship game. help.
 
I can't for the life of me figure out these damn multi-dimensional arrays. I can't figure out what I need to put in the prototype or in the actual function call...
[1 reply] : I'm really wondering if this code will compile. You should declare you... (by tcs)
Comparing 2 Character Arrays
 
Hi, this is my first post here so I hope I include everything I need to. The purpose of this program is to compare the correctAnswers array to the studentAnsw...
[3 replies] Last: Wow, thank you both so much. That was such an easy solution I just cou... (by helenkr)
November 2014 Pages: 1... 1718192021... 65
  Archived months: [oct2014] [dec2014]

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