49,755 Topics

Member Avatar for
Member Avatar for royi.navon

/* the thing is that i need to check if a given number (n) is a palindrome. i also used limits.h to identify if the number is is exceeding the limit. i came up with this beut it's no good. any ideas? */ #include <iostream> #include <stdlib.h> #include <limits.h> #include …

Member Avatar for tinstaafl
0
133
Member Avatar for atzounis

Hello all, So here is my problem: I have 2 functions that one uses the other's calculations and result: int functionA(int a, int b) { int x = a+b; return x; } int functionB(int a, int b, int c) { int xx = x(a,b); int f = xx * c; …

Member Avatar for NathanOliver
0
265
Member Avatar for VUEKID

I need to read a text file, parse file, and check occurence of words without leading or trailing punctuations. this is what i have so far, std::ifstream f("textfile.txt"); std::istream_iterator<std::string> eof; std::multiset<std::string> words( std::istream_iterator<std::string>(f) , eof); for( std::multiset<std::string>::iterator i = words.begin(); i!=words.end(); i = words.upper_bound(*i) ) std::cout << *i<< ": " …

0
76
Member Avatar for glao

Hello, I wanted to ask. If I define `typedef float mymat3[3];` and then I have a function: void myfunc(float *One_mat_, .... and inside function I do: mymat3 * One_mat=(mymat3 *)One_mat_; while(i<numPoints) { One_mat[i][0] = (One_mat_[++c1]); Does this mean , that I am copying One_mat_ (which I am casting it as …

Member Avatar for glao
0
168
Member Avatar for moon.fall.58

I can't figure out how to add a loop to allow the user only three attempts to enter in a valid password. Any hlp would be appreciated it . #include <iostream> // cin and cout #include <cstring> // for string #include <conio.h> // for getch #include <cctype> // conversion using …

Member Avatar for richieking
0
1K
Member Avatar for MrAlicard

Hello I want to solve it randomly reads the lines. I found a source code, but it will crash the program. This is source code: DWORD cFindEvent::GetRandomPosition() { //--------------------------------------------------------------------------------------- FILE * garew = fopen (MobCoords,"r"); //--------------------------------------------------------------------------------------- char temp[1024]; int i = 0; int j = 0; int licz = rand() …

Member Avatar for MrAlicard
0
118
Member Avatar for klemek

My code is not reading my data file well. The code is supposed to read fractions from decending order, but it does not work half way through. please help! #include <iostream> #include <fstream> using namespace std; void read_data(int nums[],int den[],int size); void clean(int Cnum[],int nums[],int den[],int Cden[],int size); void low(int …

Member Avatar for richieking
0
147
Member Avatar for pro.soltan

i wanna ahelp please hospital project i have made aclass room composed of 4(class bed) i wana to initalization all rooms ids and all beds id once time not every time i run the programmme example room 1 ---->bed1,bed2,bed3 // bed class <<--- class bed{ int id; bool empty; public: …

Member Avatar for richieking
0
88
Member Avatar for cambalinho

//write void write() { setlocale(LC_ALL, "en_US.UTF-8"); cout <<""; } template <typename A, typename ...B> void write(string argHead, B... argTail) { setlocale(LC_ALL, "en_US.UTF-8"); if (blnBlink==true) { CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); string a; a=argHead; TextBlink(a, csbi.dwCursorPosition.X, csbi.dwCursorPosition.Y,csbi.wAttributes); COORD Position; Position.X=csbi.dwCursorPosition.X+strlen(a.c_str()); Position.Y=csbi.dwCursorPosition.Y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),Position); } else cout << argHead; write(argTail...); } template <typename A, …

Member Avatar for cambalinho
0
193
Member Avatar for pro.soltan

am doing my project phase 1 its about hospital : i have made a person class--patient inherite from it i wanna afunction to----add,alter,delete patient---------------- in text file the output 1--> add patient 2-->alter patient data 3-->delete a patient class person{ int id; string fname; string lname; string gender; int age; …

Member Avatar for pro.soltan
0
140
Member Avatar for sanim.akmal

As a lecturer, you are required to prepare an analysis of your student performance based on their marks. Therefore, you have to develop a software system that capable of doing so by evaluating their marks. The computer system that you will be developed must able to find the minimum, maximum …

Member Avatar for Learner010
0
96
Member Avatar for nileshjaiswal

Plz help me tell me how we can convert the C program in C++ I working on OCX(Active X controls) plzzzzzzzzzzz...............reply

Member Avatar for frta
0
758
Member Avatar for andrew mendonca

Here is the website for the assignment: http://www.docdroid.net/6ap6/inheritance5.pdf.html Note: The ones highlighted in blue are the ones I completed, and the ones highlighted in yellow are the ones I need help with. Here is the website for the first header file (point.h): http://ideone.com/6bAeqv Here is the website for the first …

Member Avatar for richieking
0
204
Member Avatar for Labdabeta

Hello, I am working on an event driven library and am having one minor problem. Basically I have two ways to get what I want done. Method 1: Smart pointers and factory functions #include <iostream> #include <vector> #include <memory> using namespace std; class Object { public: virtual int getInt(){return 0;} …

Member Avatar for Labdabeta
0
257
Member Avatar for charlie.puzjak

When would you open and close files within a function instead of in the main program? ________________________________________

Member Avatar for mike_2000_17
0
42
Member Avatar for DTSCode

so im trying to write a website in c++ using the treefrog framework. it all went fine following this tutorial http://www.treefrogframework.org/documents/tutorial and i got the page up, but i cant figure out what files i need to edit to actually edit the webpage itself. can anyone help?

0
125
Member Avatar for apiatex

write a function named, smallestValue, that accepts five integers and return the smallest integer accepted.( just write a function)

Member Avatar for phorce
0
188
Member Avatar for karanv
Member Avatar for amt_muk

Hello, Is there any utility which can generate sequence diagram from existing C++ source code? Thanx in advanced. Amitendra Mukherjee

0
69
Member Avatar for saja.omarii.7

A palindrome is a word or sentence that reads the same forward as it does backward. Write C++ code that read string consist of 6 characters only and check if the string palindrome word or NOT.

Member Avatar for Jamblaster
0
335
Member Avatar for qhweeman

please help i would like to Write a program that inputs three integers from the keyboard and prints the sum, average, product, smallest and largest of these numbers.

Member Avatar for Jamblaster
0
163
Member Avatar for princessophia

This is the problem: Write a class EncryptableString that is derived from the STL string class. The Encryptable string class adds a member function void encrypt( ) that encrypts the string contained in the object by replacing each letter with its successor in the ASCII ordering. For example, the string …

Member Avatar for tinstaafl
0
1K
Member Avatar for VUEKID

What is the best way to read a text file and print to console, then grab that string and convert string to a const char?

Member Avatar for iamthwee
0
494
Member Avatar for VBOI

Instead of entering text to console, I want to use the text from a text file and use this function and method to do a concordance count of words and how many times they appear in the text file. check line 137 #include "stdafx.h" #include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> #include<ctype.h> #include …

Member Avatar for iamthwee
0
176
Member Avatar for KAMAE94

a C++ program that reads in two partially filled arrays. One array contains student IDs (with int type) and the other contains GPAs (with double type). The program will sort the two arrays according to the student ID and print out the results?

Member Avatar for iJimJones
0
156
Member Avatar for prettyknitty

I have been working on this code (school assignment) for a few days now. It seems to be almost finished, but I am not sure what's going on. When I run it in an online complier, it displays correctly, which is supposed to look something like this "12345" "1234500000" However, …

Member Avatar for Ancient Dragon
0
905
Member Avatar for skyyadav

#ifndef BASE_H #define BASE_H class Base { public: int m_nValue; Base(int nValue=0) : m_nValue(nValue) { std::cout << "Base" << std::endl; } }; #endif #ifndef DERIVED_H #define DERIVED_H #include "Base.h" class Derived: public Base { public: double m_dValue; Derived(double dValue=0.0) : m_dValue(dValue) { std::cout << "derived se" << std::endl; } friend …

Member Avatar for gerard4143
0
317
Member Avatar for cambalinho

the function is a std::function<void(string a) write; ok.... it's void.... but why the error about it??? what means these error?

Member Avatar for richieking
0
130
Member Avatar for cambalinho

i understand that the macro is a code that is changed before compile it. so i did these macro with these code: #define (events2((y),(x))) (class events3 : public ( y ) { events3(); ~events3(); }(x) ; ) //#define (events2((y),(x))) (class events3 : public ( y ) { events3(); }(x) ; …

Member Avatar for Ancient Dragon
0
223
Member Avatar for amani_1

Write a program that accepts two integers from the user, if any of the integers follow the other, print “ a follow b” otherwise print “***”.

Member Avatar for Warrens80
0
118

The End.