49,757 Topics

Member Avatar for
Member Avatar for V1RuZ

Hi I’m getting compile errors in the following code: [code] void Driver::read_data() { ifstream infile("data", ios::in); string name, surname; while (infile >> surname) { infile >> name; Person temp(infile); temp.read_surname(infile); temp.read_name(infile); temp.read_phone(infile); temp.read_age(infile); temp.read_weight(infile); 87 person_map[surname][name] = temp; } } [/code] The errors tell me that 87 driver.cpp instantiated from …

Member Avatar for WolfPack
0
373
Member Avatar for V1RuZ

Hi everyone. I’m having some problems:mad: debugging the following code: [code] typedef map<string, map<string, Person> > pclass; pclass::const_iterator i; map<string, Person>::const_iterator iter; pclass person_map; void Driver::add_record() { string surname, name, phone, age, weight; int new_age; double new_weight; cout << "Enter name: "; cin >> name; cout << "\nEnter surname: "; …

Member Avatar for V1RuZ
0
2K
Member Avatar for saishn

[code] #include <iostream> using std::cout; using std::endl; #include <cstring> using std::strcpy; using std::strcat; #include <cstdio> using std::sprintf; int main() { char * lb = "(?:[a-z90](?:-?[a-z90]+)+)"; int lbLen = strlen(lb); char * sbFrmat = "(?:%s(?:\\.%s){0,4})"; int sbFrmatLen = strlen(sbFrmat); int sbLen = (lbLen * 2) + sbFrmatLen; char sb[sbLen+1]; sprintf(sb, sbFrmat, …

Member Avatar for Ancient Dragon
0
238
Member Avatar for V1RuZ

Hi, I was wondering if anyone could help me. I'm constantly getting the following compiler message: 138 driver.cpp 'class pclass' has no member named 'surname' 138 driver.cpp 'class pclass' has no member named 'name' on the following lines: [code] 138 for (i = person[surname][name].begin(), i != person[surname][name].end(), ++i) { 139 …

Member Avatar for V1RuZ
0
725
Member Avatar for SHWOO

I am writing a program to calculate my paycheck. I am including in this program two functions to calculate sickleave and vacation leave. I have a hireDate data member in the format of mm/dd/yyyy, how would I figure out length of employment to calculate aquired vacation and sick leave? I …

Member Avatar for WolfPack
0
150
Member Avatar for brianotieno

[code]# include <iostream> # include <stdio.h> # include <conio.h> # include <dos.h> # include <string.h> # include <math.h> # define TRUE 1 # define FALSE 0 //if you can change to a class it can be better and faster struct member { int mid; char mainname_1[20],madd[30]; struct Read_Struct { int …

Member Avatar for Dave Sinkula
0
332
Member Avatar for brianotieno

[B][I][COLOR=Blue]if you run this code in c++ you get the following error at the underlined part is where the problem is : error C2143: syntax error : missing ';' before 'constant' : fatal error C1004: unexpected end of file found Error executing cl.exe.[/COLOR][/I][/B] [CODE] # include <iostream> # include <stdio.h> …

Member Avatar for Dave Sinkula
0
232
Member Avatar for gothicpurple

Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday [code]//ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include <string> using std::string; class ClientData { public: // default ClientData constructor inline ClientData( int = 0, string …

Member Avatar for Dave Sinkula
0
317
Member Avatar for jacove

C++ Code: [code] /* readmail.c */ #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <windowsx.h> #include <mapi.h> #include <string.h> int readmail(); long err; LHANDLE lhSession; lpMapiMessage FAR *lppMessage; lpMapiMessage lpMessage; char szSeedMessageID[512]; char szMessageID[512]; char szTmp[4096]; char szTmp2[50]; LPSTR lpszSeedMessageID=&szSeedMessageID[0]; LPSTR lpszMessageID=&szMessageID[0]; int main() { readmail(); return(0); } int readmail() { …

Member Avatar for ishwar
0
240
Member Avatar for grunge man

Ok im learning how to do exponents in c++ and I get most of this, but I dont get what double means. I do however know what float is. in the deffenition of double from my compiler help it says "double - a double-precision floating point value." but i dont …

Member Avatar for dwks
0
223
Member Avatar for JW1873

could someone please provide me with the answersd to the following c++ problems, they are simple problems which are probably an insult to most of your intelligence but i'm clueless and desperate. THANKS FOR HELPING:o 1. how would you write this expression in c++? assume all variables are of type …

Member Avatar for mostafadotnet
0
246
Member Avatar for ishwar

Hi ppl, I have made a declaration: char* str; str = " Hi there"; what do i have to do to extract a substring from this? [I]Thanks,[/I] [I]Ishwar[/I]

Member Avatar for ishwar
0
22K
Member Avatar for akadri

Can anyone suggest me a nice and easy to use C/C++ compiler under Windows.. Give the URL from which I can download. Thanks in anticipation...

Member Avatar for WaltP
1
257
Member Avatar for saishn

I get a segfault when I run the following. Seems to fail at strcpy. [code] #include <cstring> using std::strcpy; int main() { char * word = "word"; strcpy(word, "what"); } [/code] If I change char * word to char word[], it's fine. I thought that both declarations effectively do the …

Member Avatar for saishn
0
1K
Member Avatar for Gunner54

Ok My Code Is Fine As My Friend Can Compile It Fine So I Wont Show That. My Error Is This [CODE] 1>LINK : fatal error LNK1104: cannot open file 'odbc32.lib' [/CODE] I Have SDK Installed And Visual C++ 2005 With MSDN

Member Avatar for Gunner54
-1
176
Member Avatar for degamer106

[CODE]#include <stdio.h> struct FUN { char x; char *y; int z[20]; }; int main(void) { struct FUN fn1; struct FUN fn2; struct FUN fn3[10]; struct FUN fn4[50]; return 0; }[/CODE] is an assignment like fn4[23] = fn3[5] invalid?

Member Avatar for himanjim
0
135
Member Avatar for SHWOO

I'm trying to create the code for a paycheck program where I am paid double time for anything over 10 hours, time and a half for 8-10 hours and straight time for 0-8 hours. For some reason the pay isn't accumulating correctly. Any help would be appreciated. [CODE]#include <iostream> using …

Member Avatar for WaltP
0
241
Member Avatar for grunge man
Member Avatar for Eddy Dean

Hello everyone, I am trying to get an XTEA algorithm to work. I read the key from another process of which I'm sure it has a valid key at a specific location in memory. My encryption algorithm seemed to work, but when I tested it by making a buffer, encrypting …

Member Avatar for Eddy Dean
0
1K
Member Avatar for ishwar

Hi , ppl, I want to get the absolute file path of my c++ app, I tried searching through io.h, but alas , I don't know what the function is.:sad: I am using Dev C++ under Windows. [I]Thanks a lot, [/I] [I]Ishwar[/I]

Member Avatar for ishwar
0
139
Member Avatar for hay_man

I am using c++ and need to devise a method to determine the check digit of a credit card. The user enters the card no. as a string. The card no is then divided into blocks of length, x. these blocks are then added. I have the code to convert …

Member Avatar for Grunt
0
152
Member Avatar for Gunner54

I have a process that i want to attach a debugger to but it has enumwindows enabled. I want to disable that. any help?

0
69
Member Avatar for Gunner54

Ok Im Back I Think these Are the Last Error's Of The Lot This is My Code [CODE] #include <windows.h> void WriteMem(DWORD MemOffset, DWORD DataPtr, DWORD dataLen) { DWORD d, ds; VirtualProtect(address, bytes, PAGE_EXECUTE_READWRITE, &d); memset(address, type, bytes); VirtualProtect(address,bytes,d,&ds); } [/CODE] And These Are My Error's [CODE] error C2065: 'address' …

Member Avatar for Gunner54
0
800
Member Avatar for grunge man

how do u write this if then statment but in c++ if g=3282 then g=k; to bad there wasnt a then like there is an else in c++

Member Avatar for grunge man
0
699
Member Avatar for happy8899

i wan to know the code for the radix sort using a queue and a radix sort using a linked list

Member Avatar for happy8899
0
2K
Member Avatar for aeinstein

Hi All, Is the naming convention typically used for C++ vector arrays, with multi-word identifiers, to use an underscore between the words? I'm finishing up a C++ course offered by the local college - I'm taking one of the "classroom: online" sections - and I'm running into that usage in …

Member Avatar for aeinstein
0
2K
Member Avatar for yuelabtina

Hi, I need to implement a kind of real-time morlet wavelet transform for 200-samples of signal in C++. I have the code ready, which does the covolution of incoming signal and complex morlet wavelet and then take the sqare norm of the covolution result to get the energy of signal …

Member Avatar for yuelabtina
0
327
Member Avatar for ganeshprasad_7

hi everyone, i am facing a problem in developing a software of pc maintainence, i require a source code to detect the ports of a general purpose processor without which i cant further proceed please give me suggestions regarding this. bye lakshmi.m

Member Avatar for Ancient Dragon
0
116
Member Avatar for ammu117

As a beginner,For doing C programs which is the best compiler? plzz gimme a reply...

Member Avatar for Grunt
0
178
Member Avatar for Smoke

hello friends, could anyone help me by send a link where can i download visual C++ compiler for free on my email <<email snipped -- read the rules>> I will really appreciate that. Regards,

Member Avatar for WaltP
0
76

The End.