Beginners - August 2010

by dlugo
Alternative to using math.h
 
I need to convert a base 10 number to a base 16 a store it in an array. I need to check if the number is nonnegative and representable as a 5digit hex number. R...
[4 replies] Last: [quote=dlugo]I understand the first part "number >=0" but I'm not sure... (by Galik)
Console font size command
 
As implied from the title, is there any system(""); commands to alter the font size whilst running the program? Otherwise my console app will be difficult to...
[10 replies] Last: yes i know there are easier ways to do it with an app but i want a co... (by Chazzmundo)
what does this mean?
 
#define XL_1 10 #define XL_2 30 #define XL_3 90 #define XL_4 150 #define XL_5 320 #define XL_6 700 #define XL_7 2000 #define XL_8 5000 #define XL_9 130...
[2 replies] Last: thanks man i appreciate the help (by L E G I O N)
by wtf
Getting program to run in background
 
How would I get a program to run in the background without running in any console or window?
[5 replies] Last: I don't think there is a simple way. What difference does it make thou... (by hamsterman)
overloading [] operator for pointers
 
Hello to everyone. I'm trying to overload array-access operator, but I'm not able to make it work with pointers to objects. I made a simple example to expos...
[2 replies] Last: It worked. Thanks for your reply. (by mdonati)
what does it mean by static type safety?
 
as above... and what does this sentence mean: But maybe the most important problem of an overly rich interface is loss of static type safety
[2 replies] Last: Keep reading. The text explains what it means. (by helios)
Displaying fractions as 1/8 rather than .125 ?
 
I have made a program that displays a grid size for tile installations. My friend is familiar with fractions, but I know he will be confused when he sees (fo...
[7 replies] Last: Code below. example usage: #include "fraction.h" int main() ... (by R0mai)
Error Message using jGRASP
 
So we just started writing programs and I followed my teachers code to the T and it looks like this. #include<isostream> using namespace std; int main() ...
[4 replies] Last: So I have figure out the issue. However I am not sure how to fix it. T... (by cdringe1)
error LNK2019
 
Hey, I keep getting this error 2019 in my project. I suspect it has something to do with my operator<< functions, since it only pops up each time I call th...
[2 replies] Last: Well, that explains why I had this problem in a lot of my projects, th... (by Stiltzkin)
by civus
Problem with VC++ Headers
 
Hi Guys, this is my first post here so please go easy. Anyways, I'm obviously something of a beginner with C++ and have been teaching myself using CodeBlocks an...
[3 replies] Last: Can anybody else with VC++ try running this program and see if it work... (by civus)
My Program Stops Working Half-Way Through
 
Hey, this is my 2nd day of programming C++ and i have coded a program, it seems to stop working after one of the questions i have set, I tried many diffirent co...
[8 replies] Last: thank you so much, not only was your code alot shorter than mine, it a... (by Blutooth)
Vector array
 
Is there something wrong with this: #include <vector>; using namespace std; vector<int> g1p1(261,35,243,240,445,24,297,148,298,95); ? My compiler...
[3 replies] Last: Yes, if you want to give the numbers to the vector in a list form. In ... (by R0mai)
Accepting [SPACE] as an input
 
I'm sure this is simple and obvious but I've been through books and Googled and found nothing. All I want to do is accept as input for a variable. At prese...
[2 replies] Last: Excellent, thanks! I actually cut out the do-while statement for mine,... (by rassilon256)
by yts
check string
 
#include <iostream> #include <string> using namespace std; void check(const string& s1, const string& s2) { if (s1 == s2) cout << "== "; if (s1 != s2) cou...
[3 replies] Last: ok.thanks u:) (by yts)
by Chad
Problem with function rename()
 
Hello everybody, i have problem with 'rename()' function, take a look at the code #include <cstdio> #include <windows.h> int main() { rename("D...
[no replies]
how to insert int value to string object?
 
when I use getline(ifs,str). I need to add a int value ( int line; )to every line read from ifs object( ifstream ifs("intput.txt"); ). how can I Assignmen...
[3 replies] Last: I don't see how am I wrong. Maybe if I put this into function, it will... (by hamsterman)
Return by Pointer, or, return by Reference?
 
I want to return a pointer to an object from a function to any function that called it, but I am not sure whether that object being pointed to is merely a copy....
[4 replies] Last: No worries. Thanks Disch. (by AlphaBravo)
Calculator problem
 
Hey.I am writing again,I put all my calculators thogether and it is pritty good:) But i have problem when i use one function(+ , - ,* , /) and when i finish cal...
[5 replies] Last: oh yeah, sorry... (by kaduuk)
I am new to programming and wants to know how to start writting a program
 
How do you start writing a program with cplusplus.
[8 replies] Last: Let me, PM you how i dealt with the whole procedure! Step by step. (by Gwamaka)
by luchie
Assigning Bool value Question
 
I am trying to allow the user to guess a random number, then assign the bool value if its true or false. I do not understand why my bool value always returns 1,...
[1 reply] : if (answer = num){ You're assigning num to answer here. You'r... (by Disch)
August 2010 Pages: 123... 28
  Archived months: [jul2010] [sep2010]

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