General C++ Programming - October 2014

c++ else if statement
 
void printScores() { for(int s= 1; s < 25; s++) { if(testscores s = 0 && testscores...
[3 replies] Last: doug4 explained how to fix your code. But this can easily be calculat... (by zoran404)
Array of 10000, display only 5 problem
 
#include <iostream> #include <iomanip> #include <ctime> #include <cstdlib> using namespace std;...
[1 reply] : for(int k = i; k < (k+2); k++) Your problem is here. The value k w... (by doug4)
strcmp weird error?
 
Hey. I am getting an error in finding node in BST. Is there any difference betwee if(strcmp(root-...
[1 reply] : Well the second one has a stray comma after 'barcode' that would preve... (by Disch)
Names with spaces
 
I was previously talking about this in a seperate thread, but it was nothing to do with the topic so...
[5 replies] Last: Okay, thanks. I was just basically wanting my version of int to fit in... (by shadowmouse)
Question about goto Statement
 
int main () { char buffer ; fgets(buffer, 256, stdin); for (int i=0; i<21; ++i) { ...
[3 replies] Last: #include <stdio.h> #include <string.h> #include <ctype.h> int main()... (by JLBorges)
Unscrambler
 
This program should be easy for those who are experienced //not me So i want to make a simple word ...
[7 replies] Last: The aha! insight is to sign each word in the dictionary so that words... (by JLBorges)
Why this code is not giving output?
 
Why this code is not giving output? When the input value of n>1. // Example program #include <i...
[1 reply] : What is it supposed to do? (by kbw)
Nested if-else
 
Hi, When I key in N or n, it will state as "Congratulations! You are qualified to apply", when it...
[3 replies] Last: Thank you! =) (by missjune)
just a question
 
hey guys i was practicing c++ i just want to ask if this type of program is an example of recursio...
[4 replies] Last: no i understand it now thanks . (by theposibility)
please i need to learn this
 
i have a question how does this line work out //(base * recursive(base, total -1);// im confuse be...
[2 replies] Last: thank you so much (by theposibility)
Storing objects using std::vector
 
I have two classes, Parent and Child, where Parent contains a vector that is used to store instances...
[3 replies] Last: Huh? From the above-referenced web page: Inserts a new element at t... (by doug4)
Use fgets and strlen to calculate the length of a txetstring
 
#include<stdlib.h> #include<stdio.h> #include <string.h> int main() { char input ; char b...
[2 replies] Last: When you use fgets and hit "Enter", a newline charater is included at ... (by LazaroBinda)
Classes that reference classes (1,2)
 
I've split the main part of my program into three classes and their respective functions. I have my ...
[22 replies] Last: That's very helpful. The only problem I can think of at the moment is ... (by shadowmouse)
Binary Search Tree VS Linked List
 
What is the difference between BST and linked list? Or are BST implemented through linked list?
[6 replies] Last: member of bst of what type? type *root? void* root? am getting segm... (by csstudent123)
by paligq
Need help on homework. New to programming.
 
I need to build a program that gets 50 random numbers in an array and sorts them using selection sor...
[3 replies] Last: I did all that stuff and it looks more cleaner and better, but it stil... (by paligq)
print my .dat and keep the previous information
 
i have wrote my code which ask for weight and height but every time i enter my information which wil...
[no replies]
I am having a problem solving this. I dont know what i am doing wrong
 
Im trying to do this function and i dont know why it isnt running. #include <iostream> #include <fs...
[2 replies] Last: Life saver. Thanks. (by bandosj15)
Matrix Navigation via Pointer
 
Hey there, I want to navigate a 2D Matrix (for example: int iMatrix ), with a pointer. I'm not ...
[4 replies] Last: I'll share the code block I came up with, using segments from the link... (by SixTsevN)
by yo2xia
how do I eliminate a specific column of a matrix using Eigen in C++
 
Apologize if this question is naive. I want to eliminate i-th column of Matrix X, so I use Xnew=X.l...
[no replies]
how to ?
 
hey guys im studying about recursion by myself and i want to make a recursive function that prompts ...
[4 replies] Last: Yes, but it's only because that is a function returning int. If you wi... (by LazaroBinda)
October 2014 Pages: 123... 38
  Archived months: [sep2014] [nov2014]

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