49,761 Topics

Member Avatar for
Member Avatar for ckocina

im making a class called BigInt it will store integers in an integer array, 1 digit per array location(just ask if you need me to clearfy any more).....i have to make an addBigInt operation, subtract,setBigInt that will store an integer value into an existing BigInt, e.g. x.setBigInt(-397) replaces the value …

Member Avatar for ckocina
0
97
Member Avatar for Rimojenkins

Hey again! I've asked a question here once and have been lurking ever since. I was working on a new program and have come across problem. I don't really know what's wrong so I assume I overloaded something. The problem is in this snip of code [CODE]for(int m=0; m<num+1; m++) …

Member Avatar for Rimojenkins
0
11K
Member Avatar for lochnessmonster

im quite confused on how typedef int (__cdecl *MYPROC)(LPWSTR); works exactly? how do you typedef a function? any explanation is greatly appreciated! thx :D [CODE]// A simple program that uses LoadLibrary and // GetProcAddress to access myPuts from Myputs.dll. #include <windows.h> #include <stdio.h> typedef int (__cdecl *MYPROC)(LPWSTR); VOID main(VOID) { …

Member Avatar for mike_2000_17
0
556
Member Avatar for Rickay

[CODE]#include <iostream> #include <windows.h> #include <ctime> #include <cmath> #include <iomanip> #include <string.h> double numerator, denominator; static short multiplycounter; static short dividecounter; const double ten = 10; double* ppnumerator = &numerator; double* ppdenominator = &denominator; using namespace std; /**********************************************************************************/ double lcm(double numerator, double denominator) { if(*ppnumerator > *ppdenominator) { for(long counter …

Member Avatar for frogboy77
0
189
Member Avatar for DaniwebOS

For some odd reason, I can't get anything to be displayed when the program is running. I believe its not passing anything at all which would explain the blank console. If anyone could help me out that would be great. Without using functions the program successfully shows: 1) Student's name …

Member Avatar for DaniwebOS
0
130
Member Avatar for iamthesgt

Okay, we had an assignment in computer class that I have been working on for awhile but what I've got so far isn't working. It seems that it may be a compiler issue, but since I can't get to a linux compiler (what the program will be evaluated on), and …

Member Avatar for iamthesgt
0
169
Member Avatar for skips

My problem is that I need to write a program that asks the user to input a number from 1-99 and outputs the number spelled in english. I believe that I have the general outline down in that I will break it up into statements using If and Switch statements. …

Member Avatar for Red Goose
0
127
Member Avatar for Abelville

Im getting this error and I am so new at this that I have no idea how to correct it. If someone has any suggestions. Programming for 10 weeks! [CODE]#include <iostream> #include <string> #include <iomanip> using namespace std; int InputData(string [], int []); int main() { string players[99]; int score[99]; …

Member Avatar for Abelville
0
191
Member Avatar for Scooterman1

So I've been working on a program that takes a string and then puts it in an i * 6 char array but I can't seem to get it to work, any help with the problem would be much appreciated. Here is the unsatisfactory code I have so far: [CODE] …

Member Avatar for Scooterman1
0
377
Member Avatar for mohamed_nasr

At debugging the code, the program gives 2 errors Error 1 error LNK2001: unresolved external symbol _mainCRTStartup Error 2 error LNK1120: 1 unresolved externals

Member Avatar for mohamed_nasr
0
586
Member Avatar for banh

I am trying to learn C++ ifstream i came across this code on the net and have some question. void read() { ifstream inFile ("in.txt"); string l, i; int item = 0; while (getline (inFile, l)) { // is this one checking end of file like java? istringstream linestream(l); // …

Member Avatar for banh
0
163
Member Avatar for nips

hey guyz.i have a c++ code using structure arrays.I want to sort the records by id and by age(using 'sort' function)and by name (using 'sortN' function). My problem is i cant figure out how to pass the records to the relevant functions from the'main' function and also how to get …

Member Avatar for sahil1991
-1
53
Member Avatar for trante

I use Visual Studio 2005 on windows XP. I'm trying to use "Google Test" framework. But i couldn't manage to make just one test because of linker errors. I built Google Test, thank created new project. Then made the steps written in [URL="http://stackoverflow.com/questions/531941/how-to-setup-google-c-testing-framework-gtest-on-visual-studio-2005"]this link[/URL] to the project properties file. Than …

Member Avatar for trante
0
525
Member Avatar for thelerner

hye all :) can u help me with this code: [CODE]int list[4][4] ={7,23,12,6, 2,1,4,10, 65,15,33,8, 18,26,42,12}; int i,j; for (i=0;i<4;i++) { for(j=0;j<4;j++) { cout<<list[i][j]; } }[/CODE] there's output but i want it to display 4X4

Member Avatar for daviddoria
0
140
Member Avatar for KazenoZ

Hello, I'm having this problem in my code that I just can't figure out the reason to, I'm trying to set an integer value to an integer variable that's a member of a class that is part of an array member of another class. It should be an int = …

Member Avatar for KazenoZ
0
578
Member Avatar for becool007

Okay so this is getting on my nerves now. Say I have a string like this "The average value for box 1 is:" and I have a float variable containing digits. How do i make the final result like this: "The average value for box 1 is: 12.01" ?? In …

Member Avatar for ravenous
0
110
Member Avatar for kcarl

Hey Guys n Gals Im a newbie here and I am having trouble with putting input into a two dimensional array. What I have to do is put the users numbers (integers not doubles) into a matrix add them, subtract them and multiply. I have most of my code written …

Member Avatar for ravenous
0
136
Member Avatar for petero_l

Hello it is my first time here and I just started C++ so hopefully my question isn't too dumb or anything: I was writing this thing that can do geometric series and arithmetic series. I can write the geometric series code alright and the arithmetic series code alright but once …

Member Avatar for petero_l
0
251
Member Avatar for jhollie

#include <iostream.h> #include <conio.h> #include <stdlib.h> #include <dos.h> #include <string.h> #include <stdio.h> #include <graphics.h> #include <process.h> char board [3] [3]; void rules(void); void help(void); void play(void); void restart(void); void credits(void); void draw(void); void printplayer(int); void printcomp(int); void result(void); char name[100]; void input(void); void input2(void); void mapboard(void); void main() { int …

Member Avatar for chrjs
-1
143
Member Avatar for somshridhar

[CODE]// istream get #include <iostream> #include <fstream> #include<string> #include<cstring> //#include<sstream> using namespace std; int main () { char c, str[256]; ifstream is; cout << "Enter the name of an existing text file: "; cin.get (str,256); is.open (str); // open file ofstream was; was.open("output.mvw"); string st ("There are two needles in …

Member Avatar for WaltP
0
170
Member Avatar for PerplexedWon

My problem: I am now able to get the program to compile, however, when i call the functions to count the number of consonants or vowels, the numbers are not what I expect. Instructions: Write a function that accepts a pointer to a C-String as its argument. The function should …

Member Avatar for PerplexedWon
0
772
Member Avatar for zarbhebz_1012

Hi im a c++ beginner and i'm doing a tic tac toe program hollywood squares style only with math questions. what im trying to do here is im trying to insert a timer such that the player only has 20 seconds to answer each question or he/she loses his/her turn.. …

Member Avatar for WaltP
0
135
Member Avatar for AnonymousX

Well, i'm working on a text Editor. I'm still a little nooby with C++. I'm trying to create a Goto Line Command. Would someone give me an example of how to do it? Thanks :P

Member Avatar for chrjs
0
343
Member Avatar for lexusdominus

Hey guys. Im writing a console based application which i want to convert to a windowed application. however, i still want the user to be able to type in input and for my program to be able to output in a console based style, i'd just like the option to …

Member Avatar for lexusdominus
0
206
Member Avatar for glenn_boy13

please help me guys :). I found several articles about preventing the user from entering characters but I can't understand them. [ICODE] int num_sub;//subjects setcolor(143); cout<<"Enter the number of subjects:"<<" "; setcolor(15); cin>>num_sub; if(isdigit(num_sub)==0){ cout<<"CONTINUE"; } else{ cout<< "\n numbers only!"; exit(0); }[/ICODE] here in my code: when I enter …

Member Avatar for Nandomo
0
118
Member Avatar for Mayank23

how can a user be able to type what ever he wants such as " i went to the park...", i tried to do it but with my string variable it only read the first word typed in, such as i in this case. please help.

Member Avatar for Mayank23
0
165
Member Avatar for lochnessmonster

[CODE]i understand int cars[23]; can be accessed using pointer notation such as... int cars[10]; int *carz; *(carz+1); // carz[1]; im curious as to what the equivalent pointer notation would be for a structure..for example struct car { int wheels; float gas; float engineHP; }; struct car cobalt; cout << cobalt.engineHP …

Member Avatar for VernonDozier
0
144
Member Avatar for Nandomo

Next week I am going to begin learning about linked list, I know very little currently. Are there any well written explanations of linked list online? Or can someone explain the logic to me. Want to have a background before I start learning it from my professor.

Member Avatar for Nandomo
0
94
Member Avatar for MultipleMoney

Here is my code so far for my program: [CODE]#include<iostream> using namespace std; int main() { int number; int guess; char reply; srand (time(NULL)); number = rand() % 1000 + 1; do { do { cout << "Guess the Number" << endl; cin >> guess; if (guess > number) { …

Member Avatar for MultipleMoney
0
1K
Member Avatar for tupac03

The End.