49,761 Topics
| |
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 | |
Hi Guys, Are there any APIs or VC++ libraries which enables to read .xls files Regards amit | |
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 … | |
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 … | |
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 … | |
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 … | |
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] … | |
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 … | |
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') { … | |
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 … | |
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* , … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
//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 … | |
[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, … | |
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 … | |
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? … | |
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 … | |
| 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 … |
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 … | |
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. … | |
[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); … | |
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 … | |
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 … |
The End.