49,761 Topics

Member Avatar for
Member Avatar for gilmarP

Hi, Can anybody give me a hint on how to add a counter inside the logfile? For example, if at first, the log file was created, it will write the current counter number, let say Log1. Everytime the application is open/launch the loop start and writes Log1, Log2, Log3, Log4 …

Member Avatar for NicAx64
0
218
Member Avatar for bleedi

Hey, I've got a bit of a problem: [CODE] vector<BaseClass*> stuffvector; BaseClass* temp = new DerivedClass(par_a, par_b); stuffvector.push_back(temp); delete temp; [/CODE] This causes the program to crash. I have virtual destructor, so the DerivedClass's destructor should be called just fine. Does it have something to do with the vector? 'Cause …

Member Avatar for mrnutty
0
131
Member Avatar for glenndr_15

Greetings! Just wanna ask a sample program for visual c++. Thanks Best regards, glenndr_15

Member Avatar for mrnutty
0
183
Member Avatar for Jackk123

I know there are a lot of topcs. I was searching for what i needed.But as i sow there wasn't anything that i can specifically use. I need a short code that generates 10 random numbers. Anyone help?

Member Avatar for mrnutty
0
105
Member Avatar for mrnutty

Just a beta of what I was working on lately. It evaluates mathematical expressions like [i]2*3[/i]. Anyways, its explained in the program. Report of any bugs would be great because I haven't tested it out that much. Without further ado, you can download the program [URL="http://uploading.com/files/ef3f69c5/ExpressionEvaluatorBETA.zip/"]here[/URL], [URL="http://www.easy-share.com/1912008094/ExpressionEvaluatorBETA.zip"]here[/URL] or [URL="http://www.mediafire.com/?69oo679h46sgtq2"]here[/URL]. Try …

Member Avatar for mrnutty
0
97
Member Avatar for johnnyturbo3

Hi, I'm currently using Eclipse for a C++ project. I've used Netbeans and MS Visual Studio before and these IDEs conveniently store Header and Source files in 'virtual' separate folders I.E. in the project folder on the HDD, they're not physically stored in separate folders. However, since moving to Eclipse …

0
77
Member Avatar for effizy

Hello all, I am completely new to c++ and have no idea what am doing or should be doing but am ready to learn. My first problem is to write a code "to calculate average score of uncertain numbers of student and the output should be (number of students,total points …

Member Avatar for bleedi
0
112
Member Avatar for saanda

Hi! Please, I really need help with a problem. I need to read numbers (float type) from a file. Numbers are arranged in rows, I don't know how many in each row, there may be a large number of numbers (milions). How can I read each row of numbers, for …

Member Avatar for mtbs1826
0
20K
Member Avatar for halofan91

Hello, new here, I am having trouble with a part of my C++ assignment I am doing for university. The assignment is about writing a structure for a bank account and then subsequently enter values for the account's number, balance, interest rate, term of holding and deposit/withdrawal amounts. The part …

Member Avatar for halofan91
0
159
Member Avatar for mns_2010

Here is a client code for socket programming: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <netdb.h> #include <sys/types.h> #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #define PORT "3490" // the port client will be connecting to #define MAXDATASIZE 100 // max number of bytes we can get …

Member Avatar for mns_2010
0
158
Member Avatar for geek1

data compression in c++. this is a text compression eg: gggghhnnnmmmmm would give us: g4h2n3m4 thank you

Member Avatar for Aranarth
0
88
Member Avatar for yapkm01

I am newbie to C++ and pretty confused about initialization of local variables for built-in and class types. Here's a snippet of the code: 1 #include <iostream> 2 using namespace std; 3 4 class A { 5 6 public : 7 A() : x(9) {}; 8 int x; 9 10 …

Member Avatar for arkoenig
0
993
Member Avatar for daneuchar

This was asked in a interview by Cognizant Technologies Print the name in center of the screen and then make the letter drop one by one out of the screen how to solve this ? ex. Every thing must be in the center of the screen Daniel then 'l' must …

Member Avatar for Ancient Dragon
0
96
Member Avatar for potato4610

ï‚· DetermineElapsedTime has only two parameters - both pointers to const MyTime. ï‚· DetermineElapsedTime must not modify the contents of either structure. ï‚· DetermineElapsedTime must not declare any pointers other than its two parameters. ï‚· DetermineElapsedTime must return a pointer to a MyTime structure containing the elapsed time. ï‚· Use …

Member Avatar for potato4610
0
173
Member Avatar for marvolo1300

Hi i encountered a problem while compiler this [CODE] if (operation != '+' || '-' || '*' || '/' ) { cout << " Incorrect operation" <<endl ; system ("calculator.exe") ; } [/CODE] I am trying to use system() to launch calculator.exe. I have used this method before, here's the …

Member Avatar for Ancient Dragon
0
103
Member Avatar for laughnan

I send out multiple types of variables (i.e. 2 char arrays, 1 int, 1 double, and two more char arrays). But when I read then back at the beginning of the program (building a LLL) I get multiple declarations of the same variables and then when I display the LLL …

Member Avatar for Kanoisa
0
4K
Member Avatar for nancy11

Hi Guys, I have a problem in my code that I don't know where it is. I submitted 400 jobs to cluster and after a while I got signal seven error. All the log files shows segmentation fault error. So I fixed the seed and used the same seed that …

Member Avatar for Narue
0
89
Member Avatar for mahsa.ehsani

i wrote the code of tic tac but it has an error: fatal error C1004: unexpected end-of-file found please help me

Member Avatar for NicAx64
-1
165
Member Avatar for NicAx64

hi all, I'm new to the linux programming first of all. I just wrote this program. [code] #include <fcntl.h> #include <stdio.h> #include <iostream> #include <string> using namespace std ; int main(int argc,char **argv) { /* open the file */ string _path_name = "./file"; string _return ; int fd=open(_path_name.c_str() ,O_RDONLY); /* …

Member Avatar for mike_2000_17
0
145
Member Avatar for blaisemcrowly

I have a problem that i have tried my best to solve.. but its not working well in my program i take both integer and character inputs. [B]when typing fast i noticed that, when a user accidentally enters a character instead of integer or integer instead of character the program …

Member Avatar for MooGeek
0
2K
Member Avatar for willgr

I have developed a C++ CGI which runs fine on Apache on Win32. I would like to deploy the program onto linux. My plan is to install Wubi (i.e. Ubuntu) and compile the CGI there so that it will work on the linux server. But before I do, I need …

Member Avatar for willgr
0
234
Member Avatar for ganesh_IT

Hi guys i have a new kind of error , i never seen before . Error Message is[CODE] Cannot update Program database "e:\ganesh_projects\Framework\Framework\debug\vc90.pdp . [/CODE] I am a fresher so any one tell what the problem is

Member Avatar for Fbody
0
81
Member Avatar for timb89

i am trying to insert a 2 integer values into the linked list, but the program keeps crashing after it gets to inserting into a linked list. [CODE] struct termNode { int coeff; int exp; termNode * link; }; void insertHead(int c, int e, termNode * & P) { termNode …

Member Avatar for Kanoisa
0
98
Member Avatar for gerard4143

Please check the line(s) of code after the comments '//this is the line of code in question... '. I want to know if this is the proper way to use the std::ostream operator<< in multi-inheritance? Basically I want the derived object(dog) to call the base object's std::ostream operators without hard-coding …

Member Avatar for gerard4143
0
1K
Member Avatar for Gait

Where can i download the best tech videos and ebooks free?The resources need to cover several aspects of technology ranging form networks,hardware,programming,databases etc.

0
49
Member Avatar for timb89

I am looking to allow the user to submit a polynomial such as +3x^6 +2x^2 +9x^0 into a set of variables which would be sent to a linked list. What is the best way to separate the variables to allow them to be looked at individually. So that: C E …

Member Avatar for timb89
0
87
Member Avatar for Bigbrain99

Is there any recommended books, websites or practices that i can do to improve my c++? I decide to become a great programmer in the future!

Member Avatar for Duki
0
152
Member Avatar for zhuimeng

I want new a array,such as double *dou=new double[600*600*900] but in the case of "WIN32",vs compliler likely could't support new a array exceed 2G if I want to new the array above, how to do?

Member Avatar for zhuimeng
0
165
Member Avatar for Bigbrain99

I 'm not quite sure if i did the right way but i just couldn't get the right value for my codes....can anyone figure out the problem? [CODE]for(int x = 0; x<myvector.size();x++) { if(number.compare(0,2,myvector[x],0,2)==0) //compare number(user's input) to the line read from getline { checknumber = true; cout<<"passing compare++"<<endl;//if same …

Member Avatar for Bigbrain99
0
83
Member Avatar for woody1144

Hi everyone, I'm new here but have found it super useful to search the forums when encountering problems so I have been in the background. I am however really stuck with bitsets and have not been able to find a relevant post here or on the internet. My issues is …

Member Avatar for woody1144
0
217

The End.