Beginners - December 2015 (Page 10)

How to make a function respond differently depending on who is calling it
 
For example, let there be a function called mark(int n, int m) if human() calls mark, then mark returns m + n if comp() calls mark, do m+=1 and n+=1 then return...
[2 replies] Last: Thanks a lot, TarikNaej! (by ephraimr)
by pang
Chess program - Moves of the King
 
Hello everyone. I am a new member here, and I truly need your help. I am a beginner in programming, and I got stuck in this program - which are the moves of t...
[3 replies] Last: The problem with your method is that it only runs 3 times, it checks r... (by keyoh)
why do I need class forward declaration ?
 
I am checking some codes try to understand it. I saw some class forward declarations. E.g.: In class A in A.cpp, I saw one line code as: class B; Class ...
[2 replies] Last: Use forward declarations to break include cycles. If b.h must include... (by cire)
by Cat32
Dual Recursive Quicksort?
 
Hey everyone! So, I'm supposed to be writing a dual recursive quick sort to sort names with the year they were born. I'm given a sample file with names and a ye...
[5 replies] Last: I'm so dumb. I forgot to increment the arraySize variable. It works. T... (by Cat32)
libcurl in class, possible?
 
Hello, I'm getting a compile error with the code below. I'm trying to get a url using the libcurl library. It works outside of the class but not within the cl...
[2 replies] Last: Awesome thank you Peter! below is the working code. #include <io... (by JenniferLostTheWar)
by SCB3
Trying to input words from link list to stack issue
 
So, I'm trying to read in a txt file to a link list, so that when a player chooses whether or not to go left or right, it stores the word into a stack (it makes...
[no replies]
row titles in table
 
I have been at this for a week now and can't seem to figure it out. My semester closes out tonight and I still have 2 other scripts to write so i'm desperate. ...
[no replies]
by ohad
menu problem !
 
why is it bring me the menu and the qwestions after that many times ? i know its getting the details i put in because when i print it its show the details... ...
[8 replies] Last: Since you have failed to heed any of the advice given, it's no wonder ... (by jlb)
Can someone Explain this code to me?
 
Never mind, I'll try to figure it out on my own.
[1 reply] : > #include <cstdlib> //Why is this used? you need to declare functio... (by ne555)
Checking for a winner
 
Alright, so I am incredibly close to finishing this program. I understand why my program wasn't making a move and I was able to fix it, but now I am trying to c...
[3 replies] Last: Here's how i did mine and it works: #include <iostream> using names... (by ratfus)
Help!! I don't know how to implement the Receipt Coding
 
I already made the code for the program and receipt. The problem here, I don't know where I can implement the receipt coding inside the program coding Below is...
[no replies]
by kpatry
prime factorisation
 
Hi! Could sommeone help me? I wrote a program that counts prime factors of numbers, do you know what could I do to print only numbers with odd prime factors? I ...
[1 reply] : n mod 2 is 1 for odd numbers, and 0 for even numbers. You have anothe... (by kbw)
pushing back a vector of pointers
 
whats wrong with the last line? no matching function for call to 'std::vector<std::vector<int*>*>::push_back(std::vector<int*>&)' test2.push_back(test); ...
[9 replies] Last: so i have this std::vector<MyMusicPlayer*> songs; std::vector<std::v... (by xenoviaquarta)
eular project 2,not working
 
Alright, so i have used 2 variables in the for loop, and i expected it to add each other in the increment step(x+=y),instead its just incrementing by 1. ...
[2 replies] Last: Of course !!!!thanks a lot man (by Blazinteen)
by HALI15
help problem with my code
 
Write your question here. there is a problem with the last two else if statement and i have no idea how to fix them. help please #include <iostream> #...
[2 replies] Last: there is also a problem with the << on 155 and the == on 141 (by HALI15)
libcurl help;
 
This is the first time of me trying to use the libcurl library and I'm having some issues. I think I'm not understanding points / references to well or some...
[1 reply] : alright! I got it to work! Now not sure if it is the right way going a... (by JenniferLostTheWar)
Constructors and strings
 
Sorry if this is really simple, I'm pretty new to coding. I'm trying to initialize an object through a constructor with a string as a parameter type and my prog...
[2 replies] Last: Well, I feel like an idiot. Thank you so much. (by crisiscore343)
AVL Tree Help
 
Whenever i compile it my height output is giving me 0 1 0 1.... this shouldn't be happening.... Can any1 explain why and check if my insert_internal & my rotat...
[3 replies] Last: I've tried to set up breakpoints to check when i do the getheight i... (by closed account GybDjE8b)
Valid move for Tic Tac Toe
 
Right now I am really struggling to understand why this is not working. So I have this Tic Tac Toe board, and I need to validate the move. For some reason it's ...
[5 replies] Last: Could you provide the source for the getiVal() method? (by xismn)
by ratfus
Why won't my program work
 
I'm trying to write a program, where two people can play tic-tac-toe. I've gotten the program to work, up until the part, where it determines if the game is ov...
[no replies]
December 2015 Pages: 1... 89101112... 43
  Archived months: [nov2015] [jan2016]

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