Beginners - April 2014 (Page 56)

Am I using dynamic memory right?
 
I have to write a code for class where the user inputs how many colors he wants to enter and then after that the user enters the different colors. I have to use...
[9 replies] Last: I fixed my error, I just deleted string * and the int in line 41. Derp... (by liquifiednate)
Help with algorithm for extraction operator
 
I am trying to program a Cartesian class with a friend extraction operator function. When I try to compile it I can't because of a problem in the implementation...
[9 replies] Last: What do you mean by "it doesn't ask for user input"? Does it just comp... (by long double main)
Pointers
 
I'm a beginner when it comes to pointers so I'm a bit confused as to what I'm doing wrong here. Whenever I pass the values to the functions they are printed as ...
[2 replies] Last: If you could give me some insight on what to change and what its doing... (by sunvsrhinovirus)
by zolo
retrieve class methode vector memebers
 
Hi, I have a short question the class methods. I have written a class (a home-brew mathematical function) which has 4 private members and two public ones the...
[11 replies] Last: Hi, thanks a lot! Now I get it! it works now! :) I know I should ind... (by zolo)
.exe runtime error
 
Can't figure out why I am getting runtime error. After showing below results a window robotrally.exe shows up And says robotrally.exe has stopped working, wi...
[3 replies] Last: On line 101 you have an excessive closing brace ( } ) On line 222, you... (by xismn)
by dayan1
Integer Square Root
 
I am trying to write code a problem that calculates the integer square root by way of calculating the square root of every number from 1 until the square of the...
[2 replies] Last: Right now you're calling the function to do the square root before you... (by wildblue)
strange segmentation fault
 
I'm working on a small project which requires some bitwise manipulation basicly in this snippet of code I am using calloc to create a null space of a certain l...
[8 replies] Last: The ampersand used here is more commonly called the "address of" opera... (by cire)
by mrfoka
Write a C++ program
 
Write a C++ program which contains the marks of 6 students for subjects Math & English. We need to output the sum of marks (Math + English Marks) for each stude...
[1 reply] : We are not here to do your homework for you :) - at least have a go... (by Codermik)
Using a 'while' loop to guess a persons age
 
So the assignment is this: "Write a C++ program that uses a while loop to guess a persons age, ask the user if the want to try again if not end the loop. Of cou...
[1 reply] : I had to add #include <cstdio> to get the code you have to compile for... (by wildblue)
Help with template functions
 
I get an error saying no matching function for call to menuOption() template <typename T> T menuOption(); int main() { string bracketName; ...
[no replies]
by iluv41
reading from a file, program crashing?
 
I'm reading from a file, the first line is already used before this, but lines 2-5 I need to be printed. This program crashes after it prints the 5th line and I...
[1 reply] : Instead of [code firstline=8]while (!inFile.eof()) { getline(inFil... (by long double main)
PROBLEM WITH SCANF_S
 
Write your question here. When I run this short program, it bombs out at the printf statement. See output. How come? #include <cstdio> int main(void) ...
[3 replies] Last: Thank you mutexe. It works. long double main, I am taking a free on... (by phztfte1)
Problems with gets()
 
When I execute de program it doesn't ask me to give the string, ¿why? #include <iostream> using namespace std; int CoutLetters(char* string, char le...
[2 replies] Last: Thaks, but: 1st) I've include those librarys, but in the new version ... (by jonanderdiez)
When writing to file, it keeps writing on the same line
 
Hi guys. Im trying to write to a file here. All the calculations are correct but it keeps writing to the same line. I know im probably missing something element...
[no replies]
Random Math question
 
Hi, I am a begginer with c++ and i need help with this code, i am trying to generate a random math question but there is always an error that i dont know how t...
[1 reply] : hiya, if(answer==one+two) {cout<<"Genius!"<<endl;} this will bl... (by mutexe)
Bool Function Error
 
Below I have a bool function (I do not use bool functions a lot) that is supposed to have an error in it, but I do not understand what it is. I have experimente...
[2 replies] Last: Oh that's true! I was too caught up in the bool function part, I didn'... (by Oh Hey Its Z)
by stdeez
vector refuses to work
 
Sorry about this noob post but vector is seriously pissing me off and it's such a stupid problem because I've been using it; but check out this code. ...
[1 reply] : vector is in the std namespace, so you need to put std:: in fron... (by long double main)
{Urgent} Find row/column of array element in last iteration of for loop?
 
So I wrote a program to find the min and max value from a set of input data . The problem is I need to know what row and column they are in, but I only am give...
[1 reply] : Make copies of i and j (in, jn, ix, jx) whenever you update the mn and... (by keskiverto)
by binf
Functions,Arrays question
 
I want to write a code that takes n numbers,then it finds the biggest digits of each number.And then, find sum of the biggest digits.For example: n=3 145 625...
[4 replies] Last: First, I suggested a int biggestDigit( int number ); but you created... (by keskiverto)
AVL tree
 
Hey. I need your help. I need to implement algorithm of construct of AVL tree binary and randomly. (2 trees) Both trees need to have: * searching the smallest...
[no replies]
April 2014 Pages: 1... 5455565758... 67
  Archived months: [mar2014] [may2014]

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