49,761 Topics

Member Avatar for
Member Avatar for vsha041

Hi, I java, under BigInteger class, there is a function called modpow, [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#modPow%28java.math.BigInteger,%20java.math.BigInteger%29"]http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#modPow%28java.math.BigInteger,%20java.math.BigInteger%29[/URL] It allows us to answer things like 99999^9999 % 78 very quickly. But I am unable to find one for c++. Thanks

Member Avatar for tux4life
0
135
Member Avatar for amitonvoip

Hi Guys, Are there any APIs or VC++ libraries which enables to read .xls files Regards amit

Member Avatar for marco93
0
173
Member Avatar for cjswanson1355

Right now i am trying to implement a vector class. However, i can't seem to get this to compile correctly. I can declare one in my main so I know the library exists, so what is going on here? [code] #ifndef _TABLE_HASH__ #define _TABLE_HASH__ #include <vector> #include <iostream> template <typename …

Member Avatar for siddhant3s
0
552
Member Avatar for BunnysMom

My teacher and i have been having a debate of sorts and this one has me stumped ( since he's actually giving me help now i'm not complaining that my brain is being picked with only one week left in the semester lol) i've never really gotten this coding thing …

Member Avatar for siddhant3s
0
97
Member Avatar for Stefano Mtangoo

Hello all, I'm trying to link two files but I get error "multiple definition of `funny_words()' " I don't know what to do, as I'm new to C++. I'm reading PROGRAMMING IN C++ by P.B. Mahapatra and the topic is PREPROCESSOR. I have to learn how to Link headers, and …

Member Avatar for Stefano Mtangoo
0
150
Member Avatar for amegahed3

Hi All, I'm a C++ beginner, and I face the following problem: There's a .txt file that has some number written successively in the 15th line of the file. Each number (that could be a one or 2 digits number) is separated by a space from the preceding and succeeding …

Member Avatar for amegahed3
0
133
Member Avatar for handytxg

Hi guys, I have list of class contain list of another class. [code] MyMessages class { ID list <myPackets> Packets; } myPackets class { Seq Text } [/code] I need advice which one is the right way to set myMessages class?? [code] void set_myMessages(const int &ID, list <myPackets> Packets) [/code] …

Member Avatar for handytxg
0
179
Member Avatar for starter

Hi Im writing this sorting program. A user can enter a First Name and Last name (10 for now). It stores them in a string. Then a user can enter 10 numbers. The program sorts the numbers and then displays the names assciated with the numbers in order. [code] #include …

Member Avatar for tux4life
0
96
Member Avatar for thornside

Hi, I need to read a file character by character and send it to cout at the same time. I have used get(char) but cannot lose the newline character. I'm quite new to C++ and havn't yet grasped the concept behind c-strings/strings. Code so far.. while(in.get(n)) { if (n=='\n') { …

Member Avatar for tux4life
0
113
Member Avatar for Clockowl

My goal is to create a program that plays Mahjong. I figured the algo would be a bit like this: [code] While there are blocks left { Fetch new board Recognize blocks //find 2 of the same images within the image. Find free blocks //not *really* necessary: computer versions don't …

Member Avatar for tux4life
0
183
Member Avatar for 123qwerty123

I'm trying to store a list of names in alphabetical order, while implementing this linked list, but I've bumped into some errors. I have my problems (like 'node' no appropriate default constructor, and 'first' undeclared identifier). This is what I have: [code] Node.h class node {public: node(node* , node* , …

Member Avatar for NicAx64
0
191
Member Avatar for jlanglopez

I'm writing a program that simulates road traffic, I have a vector of integers inside a structure, which is itself the elements of a vector. Everything works fine except the iterator i use to delete elements of the inbedded integer vector seems to be going out bound and then when …

Member Avatar for jlanglopez
0
86
Member Avatar for FREEZX

I need to write a program that will count how many numbers within an interval have an even sum of digits. you are given two numbers, a and b. i wrote a little program that is a little slow.. it checks for the sum of the digits for every number …

Member Avatar for tux4life
0
1K
Member Avatar for rEhSi_123

Hello Guys! Need some help. I basically want to align my menu to center. I have tried the following: 1 . SetConsoleCursorPosition(); 2. gotoxy(); ....etc But none what so ever works..... Here is my code menu: [code=c++] void printMenu() { void Bottomline(char *text); void Headline(char *text); void EmptyLine(); int ans; …

Member Avatar for rEhSi_123
0
114
Member Avatar for blerina12

Hello guys. I have developed a program which is supposed to read several times from the same file. I have used clear() and seekg() but nothing works. When the file gets open for the second time the program doesn't read anything from it. I would appreciate any suggestions. Here is …

Member Avatar for blerina12
0
209
Member Avatar for beschi

Dear Friends... I am new to driver development. I don't know what tool to use to develop drivers. please provide some links to find the link.. I would like to develop a minifilter to monitor and control the file system activites can anyone help me... if you know plz mail …

Member Avatar for Ancient Dragon
0
112
Member Avatar for halfnode

hi all, me again, i need to create an array within a function but somehow i'm getting errors. anyone can enlighten me? [code=cplusplus] string TravelVoucher::exchange(int i) { const int tix = 3; TravelVoucher::exchItems[tix]={"Dinner for TWO at BestFood Restaurant", "Buffet for TWO at EatTillDrop", "Ticket for TWO for Singapore Flyer", "High …

Member Avatar for siddhant3s
0
147
Member Avatar for badboizEnt

i have a program, which uses a password inputation but when i made the password encrypted. when inputting my password which now appear as star(***) due to encryption. trying to delete a character but backspace is being read as a character. please can someone show me the way forward... thanks …

Member Avatar for way29
0
1K
Member Avatar for orcsoul

My brain has just switched off on me... have an easy program to write for a C++ class that involves a for loop with a running total, but my brain has shut down on what needs to be put into the for loop to complete the program. The program needs …

Member Avatar for siddhant3s
0
531
Member Avatar for anjaly grace

//This code works for turbo c++ //Solution for strongly connected components or Kosaraju's algorithm //for nitc students //I use this because there is no other way i know how to do post a //code. ///////code:- #include<iostream.h> //#include<math.h> #include<conio.h> //int time; //time=0; char color[10]; int s[10]; int f[10]; int nn; int …

-1
85
Member Avatar for 1newguy

[code] #include <iostream> #include <string> #include <iomanip> using namespace std; void getData(char marital, int numberofKids, int& exempt, int& numberofPeople, double& grossSalary, double& penAmt); double taxAmount(double taxIncome, int perExempt, double taxRate); int main() { double grossSalary; double penAmt; int numberofPeople; char marital; int numberofKids; int exempt; double taxIncome; double taxRate; getData(marital, …

Member Avatar for siddhant3s
0
92
Member Avatar for bit9435

I have a homework assignment that I'm stuck on...i have to make a program that works like text messaging on a cell phone. It uses three classes, keypad, display, and texter. keypad - is the keypad. it allows the user to enter all alpha-numeric characters. the class handles input. it …

Member Avatar for Clockowl
0
108
Member Avatar for eck3ko

HI! i have two dlls one is in c# and the other in c++ i need to send a string from the c# to the c++ :S i've tried many ways i found all over internet but always i receive garbage inside c++, any example on how to do it? …

Member Avatar for thegrovesy
0
73
Member Avatar for xVent

Hello guys , i searched for over 2 hours how to add a messagebox when i click my button Visual C++ 2008 , in a windows app .. and i cant do it .. if any1 knows how to , please post and if anyone knows any guide or here …

Member Avatar for Ancient Dragon
0
184
Member Avatar for liveshell

Hi all, I am new to linux and got problem with pthread_mutex_trylock(). I have used mutex in my code. When I try to call pthread_mutex_trylock() on RECURSIVE type of mutex it overwrites adjacent memory location (that is global variable of type structure say x, memory allocated using malloc()). Actually I …

0
59
Member Avatar for guest7

Hi, I am getting "Segmentation fault" error in line number in the following function. [ICODE]deque <string> text; deque <string> text_1; int circuit::writetofile(int maxno,char *fname) { /* Before writing the clauses correct the line p cnf */ //deque<string> text; std::string s,t; /* Counting the number of original clauses in the file …

Member Avatar for nucleon
0
237
Member Avatar for songweaver

Hey guys, I am working on a fraction program where you can add, divide, subtract, multiply, and divide and it uses addressing. Anyway I got it to work except when I added an error message if to make sure that the 2nd Numerator, 1st and 2nd Denominator are not zero. …

Member Avatar for songweaver
0
88
Member Avatar for halfnode

[CODE=Cplusplus]#include "STDAFX.H" #include <iostream> #include <iomanip> #include <string> #include <fstream> #include <cstdlib> using namespace std; class Subject { private: string code; int cu; char pf; public: Subject(void); void setCode(string); void setCU(int); void setPF(char); }; class Student { private: string name; int count; int totalCU; Subject subjects[4]; public: Student(void); void setName(string); …

Member Avatar for halfnode
0
193
Member Avatar for archiphile

I am not only new here, but, I am a complete newbie to programing. I was on the hunt for some beginner tutorials today on the web. I found what I thought would be a simple yet in depth problem. I spent the last hour making sure that I had …

Member Avatar for RayvenHawk
0
173
Member Avatar for scarebyte

Hi guys, I have a question concerning the following code I have written for a final project in an entry level C++ course. My task requires 3 level hierarchy (which i have) and use of polymorphism. The program works in this state, but I dont think I am actually exercising …

Member Avatar for scarebyte
0
767

The End.