Beginners - April 2013 (Page 45)

Lowest value of array always shows 0
 
The problem I have is that the variable always returns 0 for the lowest number and I can't see any problem as the highest numbers returns the correct value. Cod...
[4 replies] Last: Lim Boon Jye is correct about the loop iteration. C++ arrays are zero ... (by BrianDehn)
Need explanation on recursive functions?
 
Hello all, Can someone please explain to me how calling m3(3, 4) causes 81 to be the output of the following recursive function? int m3 (int a, int b) { ...
[3 replies] Last: It is obvious that function m2 has a typo int m2(int a, int b) { ... (by vlad from moscow)
by sumsar
i have a problem with a function
 
i get an error in line 16, what am i doing wrong? #include<iostream> using namespace std; int getnumber(int high = 5, int low = 1); main(){ int...
[3 replies] Last: ok thanks for the help (by sumsar)
vector find operator overload?
 
Hi! I'm trying to make a function that checks if an object of type Block* with the m_ID same as the one I'm giving it exists inside a vector. Can I just overloa...
[2 replies] Last: fixed it by making this function: bool checkSameID(Block* test1, Bloc... (by Jonas Wingren)
Moving a sprite to a position (weird results!)
 
So I'm using SFML 2. I'm making an RTS, and I'm working on the unit moving at the moment. Pretty straight forward: you click a position, the selected unit(s) mo...
[2 replies] Last: Oh my god, thank you so much. I didn't even see that plus sign. That a... (by kong288)
Having trouble computing students weighted course grade
 
I am suppose to create a program to compute a students weighted course grade but I am not getting the results I want and the the program to display how I want...
[2 replies] Last: thanks for the enlightement. I can't believe I was missing the /test... (by RemyJDH)
A compound vector question
 
Hi Everyone, I'm writing a bit of code that uses a multidimensional vector like this: std::vector< std::vector< std::vector<data> > > data_vector The rea...
[12 replies] Last: Hi Guys, Thanks for your answers! vlad was right, I needed to build m... (by KitSolent)
Array of Struct help please??
 
Thanks
[1 reply] : I do not understand why you listed here your long code?! What is the r... (by vlad from moscow)
Multiplying arrays
 
I am trying to multiply my two arrays togeth as arguments, but I keep getting 0 as my answer. Im guessing the error is in my equation. Any help would be appreci...
[3 replies] Last: The array() does matrix multiplication correctly. Well...almost. Sh... (by closed account D80DSL3A)
Binary Vector to Decimal Conversion error
 
Hey everybody, I'm storing an n bit binary number in a vector of bools and I'm not sure whats wrong with the following function. It gives me an error along the...
[3 replies] Last: Post more of your code. (by Catfish3)
by Aquos
Help the beginner please~
 
Hi! i am new in programming, i now trying to make a simple calculation for the parking charge, my teacher giving me a question with input, the question that she...
[6 replies] Last: Thanks to those who replying me!! and sorry for late respond, been bus... (by Aquos)
cin
 
got a program cant use cin directly for numerics have to use like cin.getline but for some reason it does not work with the pointers i have set up please help ...
[1 reply] : cin.ignore(1000, 10); Do not do that. Use cin.ignore(1000, '\n'); ... (by MiiNiPaa)
ifile
 
I'm doing a project and I'm kind of stuck. The text file prog3a.txt is a file like this: 4 MBanner 35 35 35 35 35 35 35 35 34 35 35 35 36 BHunter 40 20 40 70...
[4 replies] Last: [quote=applesnstuff]How would i go about saving the string name of the... (by Yanson)
C++ program help (not entirely running) code error
 
Hi all, i have problem running this code that i built based on this C++ question and I am having trouble running. Please helppp The question is as follows ...
[4 replies] Last: Nelson007, really glad the program works. Sorry I can't help you with ... (by Donnie)
height conversion function prob
 
#include <iostream> #include <iomanip> #include <conio.h> //for _getch() using namespace std; const double CM_PER_INCH = 2.54; // othere are 2.54 cm in o...
[7 replies] Last: Still doesnt help with the convert section. It doesnt convert centimet... (by sushiroll)
can someone please solve this i been working on this all evening please!!!
 
will you help me write a program that creates an array of 10 random numbers between 10 and 20. the program will total the number of even numbers of even numbers...
[2 replies] Last: #include <stdio.h> int main() { int num1 = 0, num2 = 0, num3 =... (by Life FUTURE)
issue within code please help
 
program will not run as intended and I can not figure out why, i have used the same format in a prior program and it ran perfectly. is there a syntax error I am...
[18 replies] Last: In Visual Studio highlight all your code, then go to Edit -> Advanced ... (by booradley60)
Having trouble closing an output file stream?
 
Here's the code I have written: else{ intronCount++; intronNumberString = int2string(intronCount); intronFi...
[no replies]
Need help writing pseudocode and flowchart for the following code. Help please.
 
Hi all, I have finished writing the code for the following program. I have concerns with the pseudocode that I have written and the flow chart seems really comp...
[1 reply] : Problems so far: 1. Haven't taken on-board advice already given; 2. D... (by TheIdeasMan)
lookuptable / hash table
 
I am doing some work in which i need to simulate, potentially, a large amount of memory, I am reading in from file a memory address (0x0000000 to 0xfffffff) and...
[1 reply] : http://www.sgi.com/tech/stl/Map.html (by Zaita)
April 2013 Pages: 1... 4344454647... 83
  Archived months: [mar2013] [may2013]

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