Beginners - January 2010 (Page 22)

title problem
 
okay so I know that the function system("TITLE..."); can work for adding a title text to a program, but what if I want to display a variable in the title also, ...
[17 replies] Last: I think you can use the following way to display variable in title: ... (by zuwaka)
For loop Problem
 
Why does this code give an error line 38 to 42 #include<iostream> #include<string> using namespace std; //declare the function string GetArrayEntry(...
[3 replies] Last: Before someone calls me on it you can also do this: // Retrieve s... (by guestgulkan)
enumeration
 
typedef enum {JAN = 31, FEB = 59, MAR = 90, APR = 120, MAY = 151, JUN = 181, JUL = 212, AUG = 243, SEP = 273, OCT = 304, NOV = 334}monthList; bool tryAg...
[13 replies] Last: Duoas Yeah I will account for February's variable number for leapye... (by olredixsis)
by mozly
RunRun-Time Check Failure #2 - Stack around the variable 'word' was corrupted.
 
I'm getting this error right before the dialog box closes: Run-Time Check Failure #2 - Stack around the variable 'word' was corrupted. here is my code: /...
[4 replies] Last: Lines 171 and 177: you are using assignment ( = ) instead of compariso... (by Bazzy)
by salex
is a string is the cause?
 
Hi to all, please, help me to resolve a problem with a class function, which returns me a null string instead read data from a file. Here is the code: s...
[5 replies] Last: What is Pw.Typed_Password? What is the value of EPd immediately aft... (by PanGalactic)
Comparing a string to a defined word.
 
I tried to let a person type in a word and based on that word it would do different things, sadly this didn't work I used: #include <iostream> using name...
[4 replies] Last: switch statements require integral types. The easy fix is to use an... (by moorecm)
Type qualifier restrict
 
OK, not to sound like a complete newbie but I have searched the web a few times but still failed to properly understand the use of restrict . It restricts s...
[1 reply] : Apparently, it's only used for function declarations, not for regular ... (by helios)
by nix
OO jiasaw program
 
HI i stuck on creating a jiasaw program that needs to the following The application should save a list of Jigsaw puzzles that can be re-loaded at run time and...
[1 reply] : Please do not create multiple threads for the same program. Also, ple... (by moorecm)
Problem compiling a program
 
Hello everyone.Happy new year. I have a problem compiling this program. This program offers the user options such as to create an account delete an account e...
[4 replies] Last: thanks a lot Bazzy.Problem solved (by dionisis)
by tick
Updating Source in Real Time
 
EDIT: Thanks for everyone that tried to help and sorry for explaining this extremely bad since nobody was able to understand what I meant. The Concept of "Re...
[8 replies] Last: in php you say? well php is a scripting language, it is just a plain t... (by blackcoder41)
Working with a recursive function.
 
I made this program that asks a number and a power, and used a recursive function to get the answer. It all works except the function always returns 4, and I ca...
[4 replies] Last: You dont understand Evan. You dont need to to reference the global var... (by btripp)
Reference and value parameters
 
In a void function, if a parameter is passed by reference, that value shares the same memory location as the actual value. Is it safe for me to assume that I s...
[6 replies] Last: Passing by const reference? That rasies more questions For primit... (by Disch)
by merman
Float giving only integer part of the value
 
I wrote the following program to generate 100 random values between 0 and 1 using linear congruential generator. #include <iostream> #include <cstdlib> using...
[2 replies] Last: Thanks a lot for the reply. Will try it out and let know what happens. (by merman)
delete[] on object arrays
 
I had a question about delete . If you had an array of objects, say something like this (I know i'm using some classes and haven't provided their source code...
[3 replies] Last: the compiler is a good teacher. (by blackcoder41)
Return statements
 
Can I call a function in a return statement? If so, does it return the value of the function called or the value of the current function?
[9 replies] Last: I think I was taking it out of context...and I just learned how to use... (by yoked88)
how main() is call from main()
 
I got confused in a topic that is how main() is called from main() I know its due to recursion bt how ? please allustrate...
[10 replies] Last: ok thanks for the idea. It helps me a lot. I will now use string in... (by olredixsis)
Using GetPixel Function
 
I'm trying to make a program that will detect the pixel color in the center of the screen. This is what I have: #include <iostream> #include <windows.h> u...
[6 replies] Last: Yes, it worked, thank you. (by EvanEjk)
by ripley
overload operators
 
Hello, I have a question: why would I wanna overload operator? what is it good for and when use it? I read something about it, but I didnt get from it, why...
[2 replies] Last: great :) thank you (by ripley)
26 errors 2 warnings
 
i messed up my post
[14 replies] Last: system("PAUSE") should die. http://www.cplusplus.com/forum/articles... (by Duthomhas)
Speed -- Functions vs "Main"
 
I'm writing some basic programs that are hard on the CPU -- e.g. find all possible moves, prime numbers, etc. I know that you are encouraged to break main out i...
[3 replies] Last: Function calls don't have any significant negative impact on performan... (by Duthomhas)
January 2010 Pages: 1... 2021222324
  Archived months: [dec2009] [feb2010]

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