Beginners - April 2012 (Page 52)

Making a class function const
 
How would I go about making this code const? Its part of a 2D array that inherits a single dimensional array and manipulates that array so that you believe it i...
[4 replies] Last: Since you are doing an index check you might as well check for for neg... (by IceThatJaw)
Convert to binary? Unsure about bitwise shift
 
I'm unsure of how to use a bitwise shift or if I should even use one, but I am trying to convert a number in base 10 into binary. I thought this was the simples...
[17 replies] Last: That worked magically! Thank you very much, Athar. (by eyesofhope)
by Matf8
Can't make this program work
 
So, my college professor gave us a list of programmes we should write, and he asked us, for some reason I dare not ask, to bring it out in paper, as in written ...
[3 replies] Last: Nevermind my question, I found out what I was doing wrong later, and j... (by Matf8)
Help converting to exe?
 
Hello everyone, I am really new to programming, I am currently teaching myself using this websites tutorials. I have built a really basic program on the IDE Cod...
[4 replies] Last: Thanks everyone! I actually found it a bit after posting this question... (by JarydC33)
Why do we declare a function with Int?
 
I can't understand it. Int means integer. Integer is a number. So I don't get why declare a function with a number :S
[1 reply] : That's the return type. It means the function will return a value of t... (by Athar)
Program Reliability
 
I am working on a component reliability program for class but I am having a problem getting my program to run. Can you take a look at this please? /*-------...
[no replies]
Undefined reference to 'function' error when linking
 
I realize that this is a error that has probably been encountered before, but after searching the internet for hours and trying every solution I have seen sugge...
[2 replies] Last: Thank you very much that helped solve my problem (by LJ Nick)
Just trying to call a function of a library
 
Hi, I have a code like this below in /root_project/main.cpp: #include "theoraplayer/TheoraVideoClip.h" unsigned int tex_id; TheoraVideoManager* ...
[no replies]
Loops - Add only positive numbers
 
I am writing a program that will allow the user to enter numbers to add, BUT if the user enters three negative numbers, it has to exit the loop and display an e...
[12 replies] Last: Whenever you're questioning your design, work the problem on paper/by ... (by Mathhead200)
Problems with search in fail
 
Hi all I have some problems with searching in fail. I have mass of structs and I need to find user's telephone number by his name. Please tell me what...
[no replies]
error message
 
I am getting a weird error message that says"invalid types 'int ' for array subscript", I am trying to make a function that prints out a multidimensional array....
[18 replies] Last: How do you call the functions? This could be the reason! In the main... (by frema)
by Jar3k
Elements of a structure on init list
 
Hi, I've got a problem with initialize list which include elements of the structure. Content of the calendar.h file: struct Date { int day; int month; in...
[4 replies] Last: Nice, it works now. Thanks a lot! (by Jar3k)
by cupid
C Program not C++, but pretty easy i guess
 
main() { int b ={10,20,30,40,50}; int i; for(i=0;i<=4;i++) printf(ā€œ%dā€,i ); } output is: 1020304050 but how? Shouldn't the output be t...
[5 replies] Last: What happens is, that the compiler adds two numbers and returns the ad... (by frema)
Problem trying to read
 
I have made this function, to try to read the characters in a .txt file: void Level::ReadStream() { long p = textData.tellg(); int counter = 0; in...
[5 replies] Last: [quote=vin]I think the extraction operator ignores whitespace by defau... (by Peter87)
how to decreasing loop ?
 
Hi all, This simple decreasing loop does not work : #include <iostream> #include <cstdlib> using namespace std; int main(int argc, const char *argv ) ...
[3 replies] Last: @lalebarde: it's important to realize that the condition in the for lo... (by Gaminic)
n-dimensional arrays
 
@irritated why this compile error: void build_matrx ( double a ){ int sizeRow,sizeCol; double element; cout << "Enter the number of...
[5 replies] Last: The local array matrix1 in your function build_Matrix void build_Mat... (by vlad from moscow)
Strings/while loop
 
Hello people. I am new to C++ (only know some of the basic stuff, currently going through a beginner course). Trying to write this program and it loops, but...
[1 reply] : strcmp ( name, "four" ) != 0 || strcmp ( name, "4" ) != 0 || strcmp (... (by Peter87)
help with loops. (or maybe understanding problem.)
 
my teacher gave us an assignment to alter a previous program with loops. i cant seem to get what i am supposed to do. can someone help me to understand? here...
[5 replies] Last: while(Rep == X) // What is the value of Rep here?? do { cout << "En... (by vin)
by BPA
Need some help with class scopes?
 
When I run it, it says that 'in member function 'void calc::over() error main() was not declared in this scope'. I don't know how to make it recognize it! ...
[5 replies] Last: Also calling main() is not allowed so don't that. Maybe you could have... (by Peter87)
Bank Program - Interest not working
 
I have written a banking program. I have tested it and it appears to me that the Interest part of the program is doing the calculations for both Savings and Ch...
[3 replies] Last: Come on man, don't remove your question and fixes. Others might have t... (by Gaminic)
April 2012 Pages: 1... 5051525354... 66
  Archived months: [mar2012] [may2012]

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