-
Replied To a Post in Loan Calculation
You could use functions to take in (and prompt and validate) all user input ... this would make your code more robust and modular. For example, to prompt and to … -
Began Watching How to find ANCII value in C
Hello! I would like to ask you for help about this: Create a program in C that inputs a random number from the keyboard( long long ), finds the sum … -
Replied To a Post in How to find ANCII value in C
If you wanted to take in really long numbers ... you could use a large char buffer `char buffer[256];` to take in the chars using fgets Then easy to travese … -
Replied To a Post in C++ programming
Very creative ... :) -> using pre-fixed length C strings ... (Not a good idea usually...in designing a C++ string class ?) -> some curious stuff ... that I am … -
Replied To a Post in delete the last and first line in an interval
Ok ... still not clear what you are trying to do ... suppose you have lines in a big file that look like this: sxxxxxxxxxxxxxx... rxxxxxxxxxxxxx... rxxxxxxxxxxxxxx.... sxxxxxxxxxx............ sxxxxxxxxxxxxxx............ r............ … -
Began Watching Calculations in for loop
Hello all, My assignment is as follows: Write a program that prompts the user for the number of tellers at Nation’s Bank in Hyatesville that worked each of the last … -
Replied To a Post in Calculations in for loop
Does this help? `sum123 = sum1 + sum2 + sum3` -
Replied To a Post in Someone, please help!
A main goal here ... seems to be ... to learn how to code an insertion sort ... (of an array of prefixed size = MAX_ITEMS). It doesn't really matter … -
Replied To a Post in Someone, please help!
From the instructions you supplied just now, it seems to me that your list is really just an array ... of MAX_ITEMS size. And it would also seem that you … -
Replied To a Post in Someone, please help!
> I have to do a sorted list code according to some instructions. What are the instructions? Can you just use the STL list and the STL sort ? or … -
Replied To a Post in Loan Calculation
> you could code it: while (rem_bal > 0.0) Yes ... but then one still is using a 'double' to hold money ... and cross-checks may NOT add to exact … -
Began Watching Someone, please help!
Hello I have to do a sorted list code according to some instructions. a friend and I worked on this, and we pretty much ended up with the same code, … -
Replied To a Post in Someone, please help!
You may like to look here ... [insert sort linked list](http://developers-heaven.net/forum/index.php/topic,310.0.html) -
Replied To a Post in defining operator< for personal class that use std::sort of vector
You know, the great thing about PC's is that YOU can quickly do some code changes and 'see' ... // sortVecPointers.cpp // #include <iostream> #include <vector> #include <algorithm> // for … -
Began Watching defining operator< for personal class that use std::sort of vector
main.cpp // Give your class a < operator and define a vector of HasPtrs. Give that vector // some element and then sort the vector. std::vector<HasPtr> vecHP; std::string val; while … -
Replied To a Post in defining operator< for personal class that use std::sort of vector
This quick example may get you started on the right track ... // sortVecPointers.cpp // #include <iostream> #include <vector> #include <algorithm> // for sort of vector elements ... using namespace … -
Began Watching Type of Robot Characteristic Rule-Base system
Hai there, I am a robotic student and very new in python programming. Here, I have a project to classify the type of robot. For example, a customer would like … -
Replied To a Post in Type of Robot Characteristic Rule-Base system
> I am a robotic student and very new in python programming. Here, I have a project to classify the type of robot. For example, a customer would like to … -
Began Watching function of two variables
I want to calculate several floating point functions that are a function of two variables, i.e. a(x,y), b(x,y) etc. x and y can be represented as x=i*delx and y=j*dely. So … -
Replied To a Post in function of two variables
@Anicia ... if you do really wish help, on your Python coding problem, please start a new thread and show what work (and code) that you have so far ... … -
Replied To a Post in Passing String
> You can not have one function inside another function in either C or C++ languages. You can declare a function prototype inside a function, but the function itself has … -
Replied To a Post in Base Conversion
You wrote: > a && b if a is non-zero then b is false and not evaluated. Not clear here ... what you mean. For the expression (a && b) … -
Gave Reputation to ponedelnik in Shortest hex digit to binary conversion function
Sure, there are a lot of smart guys around. But if you think you've got a good idea, this should not deter you from publishing it, I guess... -
Began Watching Issues copying and pasting text into a console screen buffer
I have spent 3 days trying to get two new functions - GetText() and PutText() to function correctly with no success. Would someone be kind enough to look over my … -
Replied To a Post in Issues copying and pasting text into a console screen buffer
In C++ ... we commonly use 'cin' and 'getline' to get text ... and we commonly use 'cout' to print text to the console. These (iostreams) can be used in … -
Began Watching Loan Calculation
My problem with this program is within my do while loop. From line 33 to line 47. Please find attached the original intention in the pdf document ` //Program to … -
Replied To a Post in Loan Calculation
while (rem_bal!=0); ... is a problem, since ... your running programm may never stop ... since, the double value rem_bal may never be exactly zero. When working with money, long … -
Began Watching how to get the middle word of string?
heyy all ,, i'm trying to get the middle word of sentence contains 3 words using find and substr.. this is the code : #include <iostream> #include <string> using namespace … -
Replied To a Post in how to get the middle word of string?
> heyy all ,, i'm trying to get the middle word of sentence contains 3 words using find and substr ... Do you really have to use 'find' and 'substr' … -
Began Watching pseudo code and algorithm
import random while True: dice = random.randrange(1,5) dice2 = random.randrange(1,7) dice3 = random.randrange(1,13) sides = int(input)("Which sided dice would you like to roll? You can choose a 4-sided dice, a … -
Replied To a Post in pseudo code and algorithm
> what about the algorithm? Hey man ... promptText = "blablabla..." TopOfLoop: input = getInput( withPromptText ) if( ! valid( input ) ) goto TopOfLoop if( input == quit ) … -
Began Watching calculating prime using array and functions.
IS IT POSSIBLE TO PASS AN ARRAY INTO A FUNCTION AND THEN CALCULATE THE PRIME NUMBERS OUT OF THE LIST? -
Replied To a Post in calculating prime using array and functions.
You could handle it some thing like this: void getPrimesInList( Clist* in, Clist* out ) { Node* cur = in->head; while( cur ) { if( isPrime(cur->value) ) push_backClist( out, cur … -
Began Watching Random Number Game
#include<stdio.h> #include<math.h> #include<conio.h> #include<string.h> #include<stdlib.h> int main() { int i, n, diff; int x=rand() % 100; int bMoveHigher = 0; int bGuessedCorrectly = 0; printf("Welcome to Guess a Number Game\n"); … -
Replied To a Post in Random Number Game
Ok ... you got it working ... but ... What about ... if the user enters non-numeric char's when an int is expected? Try your program and see what happens? … -
Replied To a Post in Base Conversion
What is the difference between these ... ? a) //Convert and check if we have a valid data for(i=0; i<len; ++i) { value=buffer[i] - '0'; if (value < 0 && … -
Replied To a Post in Shortest hex digit to binary conversion function
please edit above line 78, 79 to ... cout << "asciihex2int( '" << line[0] << "' ) = " << asciihex2int( line[0] ) << endl; so that the 'original char' … -
Gave Reputation to john.kane.100483 in Explanation
Hello :D I would like this to be explain. What is meaning of this following codes and why are they in there? I really don't understand. void Binary2Decimal() total=0 "%16s" … -
Began Watching Shortest hex digit to binary conversion function
// Shortest function to convert an ascii hex digit to binary // (assumes a valid hex digit 0-9, A-F, a-f) char asciihex2bin(char ascii) { if (ascii > 0x40) ascii += … -
Replied To a Post in Shortest hex digit to binary conversion function
Did you mean ... a short hex char to int conversion ? // ascii_hex_char_2_int.cpp // // http://developers-heaven.net/forum/index.php/topic,46.0.html #include <iostream> #include <string> using namespace std; /* 48 060 30 00110000 0 … -
Began Watching delete the last and first line in an interval
hey all well i have been facing this problem for days ...i have written a program where i am suppose to read a specific number of lines within different intervals … -
Replied To a Post in delete the last and first line in an interval
The first step in solving a problem is a clear statement of what is required. You wrote this at the top: > ... been facing this problem for days ... … -
Began Watching qustion
write a c++ program that print (x,z,T,N) on the form of (*) by usin for loop -
Replied To a Post in qustion
It seems you were trying to show a MENU with 4 choices ... To print a big (graphic) letter, Choices are: Z or T or N or X Rather than … -
Began Watching Reading a file into Qt
I am using Qt5.2.1 and I made a program that stores some data into a file and then reads the data. it stores some variables values. After I restart my … -
Replied To a Post in Reading a file into Qt
If your data file has validated data ... all like this: 500 - 1000 : 29 1000 - 1500 : 0 1500 - 2000 : 0 2000 - 2500 : … -
Began Watching Could you help me with my c++ assignment plz?
hello guyz im afraid if i understood this assignment unproperly: could you give me the output of it plz? (how should the output of this assign be) The monthly results … -
Replied To a Post in Could you help me with my c++ assignment plz?
You may like to see this revision ... 1. that uses functions ... 2. that takes in ('crash safe') string input 3. that validates the input, in a loop, until … -
Began Watching Help with C-compiler
Hello please i have a problem with my compiler. When ever i try compiling a program it gives me warning saying" Source code not compiled" I use Devc++ compiler. Do … -
Replied To a Post in Help with C-compiler
You can try an updated Dev ... has C++11 ... also 32 or 64 bit [Dev now has C++11](http://sourceforge.net/projects/orwelldevcpp/)
The End.