49,756 Topics

Member Avatar for
Member Avatar for Takafoo

Hey, Ive got a program I'm try to work on that the user enters the number and then it reports back if the number is prime or not. So far my calculations are completely off and I have no idea how to fix them or what they should be. Any …

Member Avatar for vmanes
0
118
Member Avatar for colmcy1

Hey all, I am having trouble with a program I am trying to write. Basicially I have a 2 sets of 9 "if statements". These if statements give me the parameters for 3 functions. The problem I am having is that the I am getting errors that are telling me …

Member Avatar for Narue
0
135
Member Avatar for etc123

During a C++ script compilation, and doing exe building in AIX 5.3 using xlC compiler, I get the warning shown below: [CODE]ld: 0711-224 WARNING: Duplicate symbol: .NotNode::NotNode(BoolNode*) ld: 0711-224 WARNING: Duplicate symbol: .UnaryNode::UnaryNode(BoolNode*) ld: 0711-224 WARNING: Duplicate symbol: .OrNode::OrNode(BoolNode*,BoolNode*) ld: 0711-224 WARNING: Duplicate symbol: .BinaryNode::BinaryNode(BoolNode*,BoolNo de*) ld: 0711-224 WARNING: Duplicate …

Member Avatar for mitrmkar
0
436
Member Avatar for lehe

Hi, I am goint to create a very large array but have this error when running this code [code] #include <iostream> #include <limits.h> #include <cstddef> #include <cmath> using namespace std; int main() { cout << UINT_MAX << " " << ULLONG_MAX << endl; cout << pow(pow(24,2),4) << endl; unsigned long …

Member Avatar for nucleon
0
183
Member Avatar for pslacerda

Hi, I'm pretty new on C++. In a Windows Forms project I need a bitmap slide bar and a bitmap pointer to the bar. The bar is like this: [URL="http://img440.imageshack.us/img440/3997/barrad.png"]link.[/URL] Each horizontal position of pointer must return an number related with minimun and maximum possible position, that coincide with the …

0
52
Member Avatar for daviddoria

I've seen a few questions about this floating around here (mostly from me :) ) but I finally got this is into a nice working form - maybe it will be useful for someone. It is called like this: [code] void TestParallelSort() { vector<double> Numbers; Numbers.push_back(3.4); Numbers.push_back(4.5); Numbers.push_back(1.2); vector<string> Names; …

0
228
Member Avatar for Traicey

I need to keep track of odd and even number which will be accepted from the user 10 time after the user entering them I have to print something like odd number = "The number of odd numbers from what she/he is inputed" and even numbers = "The number of …

Member Avatar for Traicey
0
99
Member Avatar for redrum237

I have a student report system, which runs several queries. one query is to: List all payments made by each student, alphabetically by enrolment number, and show amount paid and outstanding. My program works, and what i get displayed is the student number(foreign key), the amount paid, and the amount …

0
65
Member Avatar for eugene83

I'm new to C++ and I'm having a hard time with classes the question is [COLOR="green"]int main(void) [COLOR="Green"]{ Point ary[5] = { Point(1, 2), Point(3, 4), Point(5, 6) }; Point sum; sum.SetXY(sum.GetSumX(ary, 5), sum.GetSumY(ary, 5)); sum.Print(); return 0; }[/COLOR][/COLOR] for this main function how do I make a Point class …

Member Avatar for siddhant3s
0
91
Member Avatar for everard

I can't retrieve the data from my "file.mdb" file. Below is the code I created: code = m_Code.Mid(beginIndex, endIndex); CDaoDatabase database; CDaoRecordset recordset(&database); CString lpszFile = "C:/file.mdb"; database.Open(lpszFile, FALSE, TRUE, _T("")); recordset.Open(AFX_DAO_USE_DEFAULT_TYPE,"SELECT * FROM KeyID", 0); COleVariant olevar; while(!recordset.IsEOF()); { olevar.ChangeType(VT_BSTR, NULL); recordset.GetFieldValue("ID", olevar); CString fieldValue = (LPCSTR)olevar.pbstrVal; if(code == …

Member Avatar for MrSpigot
0
81
Member Avatar for Tuhin Chandra

#include<iostream.h> #include<string> class books { char author[20],title[100],publisher[30]; float price; int stock; public: void display(); void getdata(void) { char title[100],author[20]; cout<<"Name/Title of the Book--->"; cin>>title; cout<<"\n\nAuthor of the Book------->"; cin>>author; } void stock() { char choice='y',another; while(choice=='y') { cout<<"\nEnter the following into Stock....\n"; cout<<"\nAuthor-------->"; cin>>author; cout<<"\nTitle--------->"; cin>>title; cout<<"\nPrice--------->"; cin>>price; cout<<"\nPublisher----->"; cin>>publisher; …

Member Avatar for MrSpigot
0
106
Member Avatar for phoenixlsk

hi i need some help. i have to do a linked list using XOR and i don't know how to do it. thanks

Member Avatar for manojthesingham
0
365
Member Avatar for iTsweetie

Hi all! I need a little help with a problem. I've been instructed to write a dice rolling program that uses rand to roll dice one and uses rand again to roll dice two. I'm then to record the values of the two faces in a two-dimensional array. The dice …

Member Avatar for vmanes
0
133
Member Avatar for wonder_laptop

Dear all, to start with, im not asking for a code...im just too lost and need someone to guide me. can anybody help me think about implementing a hash table to store memory addresses and times for stores, and to look up matching addresses and times in the hash table …

Member Avatar for wonder_laptop
0
84
Member Avatar for booker

Hello I am trying to write to a matrix[3][3] to a file [B]column by column[/B] and at the end of each column to start from the beginning. The problem is I have to seek to write at the position a01 once the first column is written then a02 and so …

Member Avatar for Ancient Dragon
0
131
Member Avatar for danielle23

I am working on finished up a program using stacks. I am getting some funky errors when I attempt to rebuild&compile, so I am certain something in the code is not right. [B]Program Objective[/B]: Just to brief, I am using main and a .h file with classes. I am supposed …

Member Avatar for danielle23
0
1K
Member Avatar for Talguy

I am trying to communicate with my vehicles OBD port using LibSerial. When ever i send a command to the vehicle it echos back a hexadecimal value but LibSerial returns this hexadecimal value back to me as a string, i.e. "0x01A". How would i convert this hex string into a …

Member Avatar for ArkM
0
2K
Member Avatar for soulreaver20500

Hi everyone, i am very very new to c++... i have just finished a c++ in 21 days course but still rather in awe of the expanse of how it works. I was wondering if anyone on here had any spare time to help me get used to using the …

Member Avatar for Narue
0
145
Member Avatar for Natique

Hi :) I've been working on a program written in C and C++ for a while now. I built and ran the program and it worked perfectly, then saved it to my USB. I then formatted my computer and reinstalled Visual Studio 2005 professional edition, installed service pack 1 and …

Member Avatar for Natique
0
95
Member Avatar for hansel13

This subroutine is very basic, however I am struggling. When the user types q (or Q) into the input when asked for the vendor name, the program should return false... However, this function is always returning true. MY if statement is clearly not working: (*vendorName != 'q' || *vendorName != …

Member Avatar for hansel13
0
182
Member Avatar for abby2589

[QUOTE]can you help me complete this program... it is an encryption program.. it needs another text file(1), that will convert the the contents of text file(#2) and then save it to another text file(#3)..it needs 3 text file..how can i do that??[/QUOTE] [CODE]#include<stdio.h> #include<ctype.h> #include<stdlib.h> #include<iostream.h> void main(void) { FILE …

Member Avatar for Murtan
0
109
Member Avatar for Ψmon

Hello all - I need homework help. This part of the assignment is to create a struct, called StudentRecord, the first attribute of which needs to be size 20. My implementation of this is at (1). After instantiating a StudentRecord named MyStudent, I'm to assign some value to it. I …

Member Avatar for Ψmon
0
165
Member Avatar for Max721

Hi all. Is there any way to extend maximum timer count value above 0x7fffffff i.e. 24.8 days? [code] #include<windows.h> #include<stdio.h> VOID CALLBACK TimerProc( HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime ); void main() { UINT time MSG msg; ::SetTimer(NULL,0,time,TimerProc); GetMessage(&msg,NULL,0,0); } VOID CALLBACK TimerProc( HWND hwnd, UINT uMsg, UINT_PTR …

Member Avatar for nucleon
0
101
Member Avatar for RajNOX

[B]I installed netbeans and minWG. Then connect the minWG path to netbeans. every thing is okey. But the program is not being compiled. There is some error saying [/B] [QUOTE] Running "C:\Dev-Cpp\bin\make.exe -f Makefile CONF=Debug" in D:\Documents\NetBeansProjects\testapp ! was unexpected at this time. C:\Dev-Cpp\bin\make.exe: *** [.validate-impl] Error 255 Build failed. …

0
48
Member Avatar for cwarn23

I have spent endless hours searching the web for a few days now and still the only tutorial I have found (doesn't even show everything I need) is at [URL="http://www.functionx.com/vcnet/controls/combobox.htm"]http://www.functionx.com/vcnet/controls/combobox.htm[/URL] But what I need is code or tutorials on how to make graphical interfaces such as textboxes, scrollbars, tickboxes etc …

Member Avatar for mitrmkar
0
135
Member Avatar for kiro

hello! i would like to ask something about a program that i am trying to do. I wrote the program but i cant find where is my fault and doesnt check the right day for the february. I sent you my program, if anybody has something to suggest. The suggestion …

Member Avatar for MrSpigot
0
104
Member Avatar for vishy_85

hi all , im trying to compare two time values , but im unable to display the correct result , the retval returns -1 for both d1 and d2 , i suppose the mktime is the convert the values into seconds since EPOCH . any idea as to where im …

Member Avatar for ArkM
0
1K
Member Avatar for Talguy

I was wondering if it is possible to create an array of enums like this: [CODE] typedef enum { LABEL, SCREEN_BUFFER, PID, ENABLED, NUM_BYTES } SENSOR; static SENSOR sensors[] = { // formula // label //screen_buffer //pid //enabled // bytes { "Absolute Throttle Position:", "", "11", 1, 1 }, { …

Member Avatar for MrSpigot
0
109
Member Avatar for AlSal

I have the following C++ code: [code=syntax] void f(int* x) {...} void f(char* x) {...} int main() { ... f(0); ... } [/code] I understand that this has a problem interpreting which function to call. I also think I can get rid of this problem by giving it two different …

Member Avatar for Narue
0
98
Member Avatar for ellimist14

Ok I know how to sort an array. That's not what I'm asking. Basically my problem analysis is: I have to read in a file of employee reports ie salesID Employee code numunits numdollars 6022 1 3 100.00 6023 1 6 200.00 ok so I read each value into arrays …

Member Avatar for siddhant3s
0
110

The End.