Beginners - July 2011 (Page 43)

Making sense of the manual
 
I've come to the formal explanation of literals, and the manual reads as follows. All literal values have a data type, but this raises a question. As you kno...
[4 replies] Last: Because 1.2 is a double literal. 1.2F is a float literal. Without the... (by anonymous23323124)
Problem in declaring array.
 
int matrix= ; clrscr(); printf("Enter size of matrix: "); scanf("%d",&matrix ); guys i have a problem .. i dont know how to make an array of a matri...
[9 replies] Last: if you will input an array you should have a repetition statements.. (by ypmick2007)
by eidge
Stupid Function | Academic purposes
 
I was going through constructors and while I was checking the copy constructor, my mind was set away. I defined a class Scale and I was seeing how many times...
[4 replies] Last: I do the the same, but thanks anyway. ;) (by eidge)
Mixing up an Array of pointers using Random Shuffle
 
I have created an array of 9 pointers and each pointer points to a specific object. I now need to mix up the pointers so they are in a random order. I figure...
[3 replies] Last: Yes! Its now working! Thanks! (by chesterbloke)
Boolean
 
Okay, me again sorry :(. I just don't know how to make code using boolean operators. am learning C++ from this site http://www.cprogramming.com/tutorial/lesson...
[2 replies] Last: Put something like this in your code after you've read bit more tutori... (by eraggo)
A problem
 
Hi; I'm trying to make it optional whether the time is presented in minutes, but I can't do it/don't know how/don't know why what I've done is not working. Wit...
[1 reply] : You cannot write if (cin>> y) .... You need something like cin>> ... (by bl4ckb3rry)
how to remove some contents of a file
 
hi guys how can i remove some contents from the middle of a file? help me plz thanks
[4 replies] Last: OK, be calm. no problem (by CsqHossein)
Interesting problems from a contest
 
Hello there, in my quest to learn more C++ I started solving some contest excercises and I came across one that seems fairly easy but involves some weird think...
[5 replies] Last: Thank you kev82 you were right I meant tube. I finally solved it ^^ (by crisro996)
making a project
 
hey guys I've gone through most of the chapters in my c++ book,made all the programs given so far. but the problem is I want to make a project and I can't decid...
[2 replies] Last: but when I compile them they don't actually run but instead are full ... (by Raggers)
by Rox
My overridden function is not called!
 
I am trying to make a custom listener based on the observer pattern, like the listeners for Java. I have this: // eventlistener.h #include <iostream> u...
[7 replies] Last: Forward declare one of the classes and then include them in the .cpp f... (by Warnis)
Stuck on my "The Game of Life" assignment
 
I've searched a bit and found plenty of posts about this, I just can't figure out what mine's doing. If anyone's willing to take a look at my code and notices a...
[1 reply] : You got some problems with the positions in arrays like: { for (i... (by Breadman)
functions
 
Can we write and call a function inside another function ,,,please explain this with an example ?? if multiple funcs ..how ?? what should be their return types ...
[7 replies] Last: It's called a function pointer. Google is your friend. You can look at... (by ultifinitus)
Moving on from a C++ course
 
This is a completely non-technical issue. This fall, I had a C++ course at my uni, my second exposure to programming, the first being "INTRODUCTION TO PROGRAMMI...
[3 replies] Last: Socket Programming FTW. =] I'd read the tuts on this site, and if you... (by ultifinitus)
Code works in Dev C++ but not Visual C++
 
I copied this code from a working program I wrote in C++ and put it into Visual C++ and I get this error: 1 error C2057: expected constant expression 1 error ...
[2 replies] Last: Or rather, a vector: vector<string> resistors(rNumber ); number_of_... (by Athar)
Cannot be overloaded?
 
So I'm doing a little class assignment and I've ran into a little problem. My teacher in all of his source files declares all his method signatures all at once ...
[4 replies] Last: just like the sock monster in everyones laundry room who steals socks ... (by acorn)
processFile function returns error?
 
I am having trouble with my program where I am supposed to validate a series of strings from a file representing dates, and then compute what day of the year a...
[3 replies] Last: the code is a little long but im just going to guess and say that dete... (by acorn)
Performance on arrays
 
It is a little bit machine specific question. Which is better approach? for (int x = 0; x < width; x++) matrix[x+width*y]=blabla; or for (int ...
[2 replies] Last: I personally would go for the 2 nd option since the CPU doesn't have ... (by closed account zb0S216C)
ROCK Paper Scissor
 
i am stuck on how to write this ROCK PAPER and SCISSOR program. here is what i have so far. #include <iostream> #include<ctime> #include <cstdlib> using nam...
[6 replies] Last: please note i have learned to use functions, loops and selection struc... (by srostam)
letters to number
 
I am trying to convert letters to number values. For example 'A' and 'a' = 1, 'B' and 'b' = 2 and so on. The only way I have been able to think of how to do...
[3 replies] Last: thanks for the pointers (by Ishvite)
argc and argv
 
I just dont get how the hell am i supposed to use them. all the examples i have seen show me that i should cout argc and argv before i ahve even done anything, ...
[11 replies] Last: Yep! (by kooth)
July 2011 Pages: 1... 4142434445... 54
  Archived months: [jun2011] [aug2011]

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