49,761 Topics
| |
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 … | |
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 … | |
Greetings! Just wanna ask a sample program for visual c++. Thanks Best regards, glenndr_15 | |
| 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? |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
data compression in c++. this is a text compression eg: gggghhnnnmmmmm would give us: g4h2n3m4 thank you | |
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 … | |
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 … | |
ï‚· 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 … | |
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 … | |
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 … | |
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 … | |
i wrote the code of tic tac but it has an error: fatal error C1004: unexpected end-of-file found please help me | |
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); /* … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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. | |
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 … | |
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! | |
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? | |
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 … | |
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 … |
The End.