Beginners - March 2010 (Page 31)

how to find out if a double has decimal pieces
 
hey all! Sory if im uncluear, i will try to explain the best i can. Lets say there is a double: double a; lets say a = 1.70340 I want to make a funct...
[2 replies] Last: There might be better solutions : a == floor(a) Please note th... (by R0mai)
triggering another software via C++
 
hye all.. i'm a beginner and i'm having a problem in C++. Is C++ can be use to open an another software? if the answer is YES. how should i do it? should i c...
[8 replies] Last: Thx to the experts for helping me, I managed to run the software via C... (by luffykewl)
by drbasa
c++ Student Records
 
I am working on this c++ code, and It is menu driven. You are supposed to add a student record, display it, search for an id number, exit the program, and delet...
[1 reply] : StudentRecords.txt file as follows... Jone Adams M123456 3.65 Mi... (by drbasa)
Can someone tell me the different if there is any
 
I was messing around with toupper() because we just learned it in school and I wan't to change a whole word toupper so i look it up and got this: /* toupper...
[10 replies] Last: Most of the programs I write use command line arguments, or take no us... (by chrisname)
Temperature conversion issues
 
I'm trying to complete the challenge found here: http://www.cprogramming.com/challenges/celsius_converter_table.html I have the program working as specified,...
[2 replies] Last: Oh, I see. Works great now, thanks! (by closed account jwC5fSEw)
print on the same line
 
if I do for (int i=0; i<4; i++) { cout<<i<<endl; } I get: 0 1 2 3 How do I get it to print the on the same line like 0 1 2 3 ? ...
[5 replies] Last: Obviously you should use std::endl every now-and-again. Personally I d... (by chrisname)
inline function
 
i come from VB.Net where every method in a class is inline (in fact there is no way to declare functions outside of the class scope such as Class1::Func1) ...
[10 replies] Last: ic, thanks for all your replies i will keep that in mind (by pacerier)
benefit of void pointer..
 
hi guys.. wanna ask something.. what're the benefits of using void pointer rather than integer or character pointer? and in what cases void pointer is prefera...
[1 reply] : Every pointer can be converted to a void*. So void* is usually used, w... (by imi)
Vector functions
 
I desperately need some help here as there is something that's driving me nuts! I just can't explain a certain code behavior. I have this program: vect...
[6 replies] Last: [quote=Danielsson]You can't declare an array with a non-const size (li... (by moorecm)
Manipulating CIN data.
 
Hello, I just began working with programming here. So I'am just learning about cin and cout. Our teacher asked us to write a program to create a loan report ...
[1 reply] : ok well in the case of the user entering a comma, really the only way ... (by gcampton)
forum subscriptions
 
heys all, i was wondering if there was a way to set auto-subscription to on instead of having to click "my topics" -> "subscribe" for every thread i create or...
[3 replies] Last: Pretty sure you have to repeat it. I can't find anything in "user cp" ... (by gcampton)
Converting Strings using pointer to pointer
 
#include <stdio.h> void cat_convert(char **); int main() { char dog = "Dog"; char **ptr; *ptr = dog; cat_convert(ptr); printf("%s\n",dog);...
[2 replies] Last: If you think of ptr as the address of a pointer to the start of a stri... (by kbw)
by bigdog
Wierd issue using cout to print hex
 
I have these two lines of code: printf("Start Delimiter:\t\t\t %x\n", dataBuff->start_delim); cout << "Start Delimiter:\t\t\t" << std::hex << dataBuff->s...
[13 replies] Last: Ok. No problem. (by chrisname)
Loop problem
 
I'm trying to get "while (r !=4)" to properly operate in a "do-while" statement. I know next to nothing about the "do" statement which is discussed later in...
[6 replies] Last: I tried your code in MS VC++ and it calls unhandled exception during ... (by Danielsson)
problem with copy ctor / operator= (1,2)
 
My program has been working find, until I implemented a copy ctor, and operator= I changed around a couple vars, to make the scope of the class function wide, ...
[24 replies] Last: it makes sense that they're backwards when you think about how they wo... (by Disch)
Switch statement
 
I am using a switch statement to show what word corresponds with a letter. It isn't working properly though because the output shows the letter again, and then ...
[3 replies] Last: Since you did include the lower case letters too i would use a toupper... (by OnymousIllusion)
Moon Surface Area Program
 
Write a C++ program that allows the user to enter the % of the moon's face that appears illuminated, and that outputs the surface area of that portion of the mo...
[2 replies] Last: Thank you so much!!!! I guess I was on the right track..just missing t... (by MicMagicFly)
Garbage at the end of a string
 
When I try to print a string of length K on the console I get another garbage character followed by a quote " For example if the string is of length 4 and I ...
[3 replies] Last: It is because you are doing something uncouth to your string. Show us... (by Duthomhas)
Dynamic Arrays
 
I have this working but is there a way that I can create the dynamic arary with the length of the chars that are input? #include <iostream> #include <cct...
[1 reply] : yep... check for the consoles input buffer events... (by Incubbus)
I am getting two of the same exact syntax errors at once
 
My program wants two colons in the same place. I tried this, and now it asks for another one. Here is part of my code: #include "NewUser.h" ...
[1 reply] : Are you sure it's not supposed to be Form2->/*...*/ ? NewUser is a ty... (by helios)
March 2010 Pages: 1... 293031323334
  Archived months: [feb2010] [apr2010]

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