49,761 Topics

Member Avatar for
Member Avatar for rayman341

I am working on porting C++ code to Delphi and I am only having a problem with the correct conversion of memmove() statements in the C++ code. If you or any one you know could help me to convert this C++ code to Delphi I would be thankful. // Move …

Member Avatar for Duoas
0
526
Member Avatar for help22222

Write a C++ program that prints the attendance sheet of students in a class ordered by either their names or by their ID’s. The instructor will enter the number of students in the class; the students’ names [First Last] and their ID’s which will be entered as integers, and then …

Member Avatar for Ancient Dragon
0
288
Member Avatar for monstro

Given all that I hear about the problems with global variables, is it possible to declare a windows CRITICAL_SECTION object as a member of a base class that will not be created for each derived class? I want to implement an instance counter that is threadsafe, so I thought about …

Member Avatar for monstro
0
196
Member Avatar for purepecha

[code=cplusplus] //I have a problem, i trying to get the total prime numbers for each row on the output. //I jus getting the total prime numbers from the firs line 1 to 100 // my task is to get the total prime number from 1 to 100, 1001 to 2000.....49001 …

Member Avatar for Prabakar
0
113
Member Avatar for InfinityArc

hi i am trying to make a function for calculating the commercial boat fee, so if a boat is commercial, the program will add additional fee to the total sum, and if its not it won't add anything to it. i got the function to run, but all i am …

Member Avatar for InfinityArc
0
126
Member Avatar for gps

Hi everyone I'm new to c++. Some one told me that to know c++ one needs to know how it memory works but It made no sense to me when browsing the long codes froms the expects. Can anyone please advise me with steps to follow to learn c++ quick. …

Member Avatar for Sky Diploma
0
51
Member Avatar for ze-m!nd

Hey everyone, I'm trying to make a C++ program that inputs data into a web page. For example make a program that takes an input and enters it on the google search box and presses the enter button for you! Can anyone help me? Any codes or ideas where to …

Member Avatar for jephthah
0
114
Member Avatar for shadowfire36

well my struct is fix but i have new errors i hve never seen before : here are the errors [code=cpp] football.cpp(194) : error C2664: 'void Football::SearchMatches(Match *,int,std::string)' : cannot convert parameter 1 from 'Match *[2000]' to 'Match *' football.cpp(205) : error C2664: 'void Football::SearchMatches(Match *,int,std::string,int)' : cannot convert parameter …

Member Avatar for shadowfire36
0
134
Member Avatar for TheFueley

I'm trying to work out what should be a simple composition example. For some reason I can't compile this project though. I get three errors when I try to compile. Errors listed below. Where am I going wrong? 1>c:\documents and settings\user\my documents\visual studio 2008\projects\name\name\ssn.h(5) : error C2011: 'SSN' : 'class' …

Member Avatar for TheFueley
0
176
Member Avatar for Najid
Member Avatar for Jennifer84

I am readin a .txt file Line for Line and what I am interested to do is to identify that if the Line do contains any characters as Letters, text, symbols. Exceptions is things like: '\n' ' ' etc... so "" wont be possible here ? So I am trying …

Member Avatar for Radical Edward
0
87
Member Avatar for SaZ1981

Our application was ported from UNIX to Linux(x86) and we are using Red Hat Linux. I have hit a problem with Rogue Wave libraries and would appreciate any help. RWTPtrSlistIterator is being used to iterate a list which has RWTPtrSlist in them. The code flow goes something like CaUpdateSetIterator updateIter(( …

0
58
Member Avatar for amjadamjad20

HI First I apologiz ‎ about my bad language Be cuz my language is not English I have this problem in my project code And I try to solve it but I cannot This is in the part of main [CODE]int main () { Queue<primaryPatient> primaryQueue;//create object from class Queue …

Member Avatar for Duoas
0
102
Member Avatar for guest7

Hi, I wish to do the following things: a) Append the first three lines from the file "file1.txt" at the end of another file "file2.txt" b) Run a program "prog1.cpp" which uses the file file2.txt. c) Delete the three lines appended at the end of the file "file2.txt". and append …

Member Avatar for Duoas
0
94
Member Avatar for rayman341

// Size of the encrypted buffer should be void XOREncrypt (unsigned char* buffer, unsigned long length, unsigned char* key) { for (unsigned i = 0; i < length/8; ++i) for (unsigned j = 0; j < 8; ++j) buffer[i*8 + j] = buffer[i*8 + j]^key[j]; } // Calculate padding padding …

Member Avatar for Duoas
0
124
Member Avatar for rayman341

typedef struct iphdr { u_char ip_hl:4, /* header length */ ip_v:4; /* version */ u_char ip_tos; /* type of service */ short ip_len; /* total length */ u_short ip_id; /* identification */ short ip_off; /* fragment offset field */ #define IP_DF 0x4000 /* dont fragment flag */ #define IP_MF 0x2000 …

Member Avatar for rayman341
0
452
Member Avatar for ze-m!nd

Hi everyone, So my first post wasn't clear... I want to make a C++ program that takes input from an excel file and puts it on a website and submits it for you. I say this bkz at my job i have to do this... I've seen a C++ program …

Member Avatar for Radical Edward
0
79
Member Avatar for henpecked1

I have some questions, some might seem kind of dumb, but we're studying overloading operators and inheritance/polymorphing. I'm having trouble finding some references on some things to show me how to do this stuff or why I'm doing it a certain way. what kind/type of binary operators can I use …

Member Avatar for Radical Edward
0
115
Member Avatar for shahidrasul
Member Avatar for Radical Edward
0
97
Member Avatar for ulrik04

hey :) i have this piece of code: [code] while(!(std::cin >> input) || input < 1 || input > 100){ std::cout << "not valid, try again: "; } [/code] it should allow the user only to be able to write numbers between 1 and 100 (input is a short int), …

Member Avatar for Radical Edward
0
108
Member Avatar for Beemer

Hi all I am learning C++ , but am still pretty new to it I have one problem I am writing a program to simply input a mark and then it gives the corresponding symbol and according to the symbol if its anything above an E it displays you pass …

Member Avatar for Nick Evan
0
90
Member Avatar for fredyip

Hi guys, I have written a program to read streaming GPS data from a GPS usb device. I am using CreateFile() and all seems to be all right except for time synchronization. The Usb device, once connected, will continuously stream GPS data. No initialization is required, i.e. even using Hyperterminal, …

0
51
Member Avatar for Aamit

Is it possible that server sends one exe to clients and execute that exe on client machines And get information back to server. No manually execution of that exe on client machine It is automatically through server only.... Is it possible through programmatically and HOW...which concept use for this like …

Member Avatar for Nick Evan
0
186
Member Avatar for WondererAbu

#include <iostream> #include <fstream> #include "Teacher.h" using namespace std;// syntax error : missing ';' before 'PCH creation point' teacher::teacher(int tid,int cid,char *teachname) { this->tid=tid; this->cid=cid; strcpy(this->teachname,teachname); } void teacher::setTeacherId(int tid){this->tid=tid;} int teacher::getTeacherId(){return tid;} void teacher::setCourseId(int cid){this->cid=cid;} int teacher::getCourseId(){return cid;} void teacher::setTeacherName(char *teachname){strcpy(this->teachname,teachname);} void teacher::getTeacherName(char *teachname){strcpy(teachname,this->teachname);}

Member Avatar for Nick Evan
0
75
Member Avatar for nurulshidanoni

I have x and y array...After I have sort y, it succefully sort the y. but for x, there is some number that are not sort like this [B][U]x y[/U][/B]30 1 45 1 46 1 15 1 I want the x sorting also...like this [B][U]x y[/U][/B]30 1 15 1 30 …

Member Avatar for VernonDozier
0
116
Member Avatar for Alishaikh

When I run the follwing code: [code] #include <iostream.h> #include <string.h> #include <vector.h> #include <fstream.h> using std::string; using std::vector; void exchange(vector <int> &array,vector<string>&array1); void main() { ifstream fin,f2,f3,f4; //First name input vector <string> fname(25); fin.open("firstname.dat", ios :: in); for( int i= 0;i<25;i++) fin>>fname[i]; fin.close(); //Second name input vector <int> fnum(25); …

Member Avatar for bugmenot
0
103
Member Avatar for shadowfire36

ok i have wrote this program and been trying to break into a class called football , but i keep getting an: error error C2228: left of '.Season' must have class/struct/union i have tried moving my stuct around in and out of the class but im not sure how to …

Member Avatar for shadowfire36
0
108
Member Avatar for Maxil

Amateur c++ student here who has gotten to the point where I'm comfortable with classes somewhat, however I'm a bit obsessive compulsive. I've been learning by just continually adding to a program, however it's all in my main.cpp. I use visual studio 2005, and would like to take certain classes …

Member Avatar for hacker9801
0
145
Member Avatar for Jennifer84

I am replacing 2 words in a textBox with this code. What happens is that the code scans the textBox and finds 2 words: "one" and "onefour". These two words [B]should [/B]be replaced with: [B]onefour[Calculate][Calculate2] one[Calculate][Calculate2][/B] But instead the replacement will look like below. I know why it happens because …

Member Avatar for Jennifer84
0
105
Member Avatar for BigEnglisHoward

I am very much a part time user of C++ to solve particular problems and therefore a bit of a greenhorn - I am having some issues with where files are stored. When I first start up my application the path appears to be the directory where the .exe is …

Member Avatar for BigEnglisHoward
0
91

The End.