Beginners - September 2011 (Page 44)

Difference between declaration and definition
 
Hi all! "Defining" a variable means declaring it and allocating memory for it, while only declaring means no memory was allocated. No?
[15 replies] Last: Nice. Thanks for the source. (by NewProgrammer)
learning function and array.
 
i understand the basic of function and array but applying it to this assignment made me confused. Please some one help, the following below explains the assignm...
[12 replies] Last: i have some problem about array..i need to built a program about weddi... (by tiara shahrul)
c++ calculator problem
 
hello, i'm a beginner in c++ in terms of programming, though i have a bit of knowledge of OOP. i created this simple calculator progam, but it won't work. here...
[6 replies] Last: #include<iostream> using namespace std; int add(int x, int y); int sub... (by piezoelectron)
I don't understand this class member
 
Okay this whole code that I'm about to list is about using postfix and prefix operators to increment one class object to another by using the "this" pointer. T...
[2 replies] Last: thanks for telling me (by black yurizan)
Using FindFirstFile()
 
I've been trying to figure out how to use the FindFirstFile function all day, and cannot figure out how to get the first argument in the correct type (LPCWSTR)....
[no replies]
by ilnara
Dynamic pointers to pointers ...anyone?
 
#include <cstdlib> #include <iostream> #include <string> using namespace std; int main(){ int **mptr=NULL, *childptr=NULL, ar = {5,1,9}; ...
[3 replies] Last: do you know how many hours i was trying to figure that out???? "Was... (by shacktar)
Help!
 
Can I run code from a point? Like if my program has 300 lines of code. And alot of them are like cout's, could I choose a point to run the program at line 245? ...
[3 replies] Last: I reluctantly say "goto", but you're using the language in a way it wa... (by helios)
Reading bits of a character
 
Hello! I have stored some data into an array of character. I would like to be able to read the first 3bits of each characters and get fromthese bits a number b...
[2 replies] Last: you must write a function which will use Decimal To Binary math. read ... (by ilnara)
A Word List Generator - how to start?
 
Hello All, I'm pretty new to C++, but have toyed with other programming languages in the past. Essentially, what I want to create is a small program which d...
[1 reply] : Have you think about using a database? (i am pretty new to the languag... (by masky007)
help guys...please..
 
anyone can help for the code of c++ payroll?? help master please.. the result should goes like this.. Please input your name: Please input your salary: Pl...
[7 replies] Last: The computation for above would be: double sss = salary * .03; doub... (by bool maybe)
Pointers........
 
#include<stdio.h> #include<conio.h> int main() { int k=35,*z,*y; clrscr(); z=&k; y=z; *z++ = *y++; k++; printf("\n\nk = %d , z = %d , y = %d",k,z,y); getch(); r...
[6 replies] Last: [quote=hamsterman]How does cout << Pointer not work? (sic) Should h... (by closed account zb0S216C)
HELP PLEASE!!!
 
How to make program that scan a number n and then output the sum of the squares from 1 to n. Thus, if the input is 4, the output should be 30 because: 12 + 22...
[10 replies] Last: Thanks. (by kriminal)
pointers-0
 
#include<stdio.h> #include<conio.h> int main() { int k=35,*z,*y; z=&k; y=z; *z++ = *y++; k++; printf("\nk = %d , z = %u, y = % u",k,*z,*y); printf("\nk = %d ,...
[1 reply] : z and y are pointing to garbage. (by hamsterman)
by goth
Tic Tac Toe
 
Hello. I've been playing around with C++ for a while but only lately(the last month) I've really got into it. This is my first (real) program. I know it's a mes...
[11 replies] Last: you can use a for loop to check for winning combinations.. first for t... (by masky007)
Black Jack aces
 
heres a code that i wrote up for blackjack but the part where the computer decides if the ace is a one or 11 isn't working properly. if someone could tell me wh...
[2 replies] Last: I can probably tell you why this isn't working right. Because there is... (by Computergeek01)
Evaluating date types of char
 
When reading my book i look at the following abbreviated example and ask when the program is checking the data type *char* in this example it can determine if a...
[4 replies] Last: That's essentially what i assumed. Does that mean that if your using ... (by wolfgang)
how can print this?with for loop?
 
Example input Sample 1 3 Sample 2 7 Example output Sample 1 a..a a.ab aabc Sample 2 a......a a.....ab a....abc a...abcd a..abcde a.abcdef a...
[5 replies] Last: The key to drawing triangles like that is to notice how numbers of cha... (by hamsterman)
Recursion
 
#include<stdio.h> int fun(int a) { if(a==2) printf("%d",a); else { fun(--a); } printf("%d",a); return 0; } int main() { clrscr(); fun(5); getch(); return 0; } ...
[1 reply] : #include <iostream> void fun(int a) { if(a==2) std::cout... (by wolfgang)
by goth
Wait() problem.
 
What I want to do is the text to move up (like credits at the end of the movie). The problem with my code is that there is a ~3 second pause before the text st...
[3 replies] Last: That did the trick. Thanks! (by goth)
by codrgi
show last digit of string/int
 
How do i show the last number/letter of a string/int? for example take it we have the number 888888881, how do i just show the number 1?
[5 replies] Last: You can use % operator for any number of integers you want to separate... (by Undeclared)
September 2011 Pages: 1... 4243444546... 48
  Archived months: [aug2011] [oct2011]

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