Beginners - October 2014 (Page 27)

C++ exercices
 
Hi everyone I am new here and this is my first question. I would like to know if you have some websites where I can find good exercices for C++? I am currently...
[1 reply] : there are many sites when you search in google. If you would like to ... (by tath)
max integer of 3 numbers using an outside funcition
 
I need to write a program using a function to output the max of 3 integers. This is what i have so far but i cant figure out whats wrong with the program. Thank...
[4 replies] Last: How have you determined that there is "wrong with the program"? * Comp... (by keskiverto)
Constant expression required problem
 
2 questions 1. I now the compiler i am using is outdated, Its turbo c++ version 3.0 so i want to know what changes do i need to make to make my program run on ...
[1 reply] : i want to know what changes do i need to make to make my program run... (by MiiNiPaa)
by T4l0n
learning heap sort
 
i wrote this to begin learning heap sort algorithm(i know this doesn't sort anything) but everytime i complile the program crashes and i get the error "variable...
[2 replies] Last: yes, sorry, brainfart i guess :) (by T4l0n)
Help with arrays
 
Here is what I have: typedef struct list{ struct list *next; }listNode; typedef listNode *listNodePtr; listNodePtr *arr = (listNodePtr*)malloc(sizeof...
[2 replies] Last: Above you've implied that your list has 9 nodes, so why do you expect ... (by tipaye)
Difficultly Handling Vectors
 
I am working my way through the book Head First Design Patterns. The books code is based in Java; however, the explanations of the design patterns are exception...
[6 replies] Last: Nice one. If you are writing fresh code i would use smart pointers, e.... (by mutexe)
What is the difference between the following two sorting algorithms?
 
I think both of this are algorithm of selection sort. but what is the difference between this two algorithms Algo 1: void selectionSort(int arr , in...
[2 replies] Last: first one is bubble sort (by anup30)
by anup30
color fun
 
//dazzle it //by me 20.10.2014 #include <iostream> using namespace std; int main(){ cout << "dazzle it"; for (int i=0; i<=1000; i++) { if(i%...
[no replies]
Help Needed: Nested "for" loops reading data from input file
 
Hi, I am having issues with my code that reads data from an input file, and outputs it to an output file in a nice ordered manner. It reads how many students (3...
[2 replies] Last: You have a spurious loop in line 81 "for (int c = 1; c <=5; c++)", com... (by tipaye)
by MrGoat
Tic Tac Toe Player switch problem
 
Self teaching myself C++ right now. Trying to put together a Tic Tac Toe program right now. The problem I currently have is the turn is always player ones tur...
[9 replies] Last: Very true. Learning how to use a debugger to step through your code a... (by Esslercuffi)
by vxk
Help with tic tac toe program
 
I have been having problems while building a simple tic tac toe program my conditions are not being checked for player winning ….line 64? Here is my code :...
[4 replies] Last: replaced || by && (by vxk)
What kind of sorting algorithm is this?
 
What is the name of the following simple sorting algorithm? #include <iostream> #include <algorithm> using namespace std; int main() { int a ...
[1 reply] : http://en.wikipedia.org/wiki/Selection_sort (by Esslercuffi)
Tic Tac Toe: Please Help
 
We all know the game of TicTacToe. It’s easy, quick and fun. In this assignment, you will implement a computerized version of the game using a 2-dimensional a...
[2 replies] Last: -copter (by Esslercuffi)
Is something wrong on the line 8?
 
Is something wrong on the line 8? #include <iostream> using namespace std; int main() { int n,a,m,nr=0; cout<<"n=";cin>>n; for (a=9;a>=;a--) ...
[3 replies] Last: the spacebar can be your friend. (by Esslercuffi)
Sentinel Loop Trouble
 
Hello. I am having issues with setting up a sentinel loop for my calculator. Whenever I put in the input to stop the loop, the loop continues as if nothing was ...
[4 replies] Last: Thank you so much for your advice! I used your break; statement and th... (by Chipchip)
by hosoi
Why does my output prints inf?
 
I have an assignment for my C++ class that ask me to calculate the future investment value using a function prototype: futureInvestmentValue = initialDeposit *...
[2 replies] Last: Got it! thanks @Ganado for pointing out my silly mistake it works perf... (by hosoi)
trying to compair two strings
 
I'm trying to create a program that will compare two phrases. The requirement is that it has to use a loop to compare the two phrases character by character. I...
[3 replies] Last: @ lonelylense : Consider input "Patrik". Your program will tell that ... (by keskiverto)
Cannot get directory with "..\"
 
I programming in VS2012. When I add lib in Additional Include Directory, I use "..\" but it does not show my folder in D drive. And the same problem when I use ...
[1 reply] : You can add the library directory to your project directly. in VS, pr... (by Esslercuffi)
by mexi
please help me with operator << and >>
 
I have just learnt programming C++. I typed a program about operator on Borland C++ 502. When I compiled, the warning is: 'complex::real' is not accessible and...
[4 replies] Last: I think the point he was getting at was the following: If you're doing... (by Ganado)
I need help...bad...
 
So for my assignment I have to calculate the score of a students two question long, multiple choice quiz. HOWEVER. If the student does not answer a question, I'...
[4 replies] Last: else if(cin.get() == '\n') { ans = 'F' } else { //display ... (by art1986)
October 2014 Pages: 1... 2526272829... 70
  Archived months: [sep2014] [nov2014]

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