49,756 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 == … | |
#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; … | |
hi i need some help. i have to do a linked list using XOR and i don't know how to do it. thanks | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 != … | |
[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 … | |
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 … | |
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 … | |
[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. … | |
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 … | |
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 … | |
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 … | |
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 }, { … | |
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 … | |
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 … |
The End.