49,761 Topics
| |
Hi guys, I am struggling with a problem with MFC.. i think its a small one.. but from my point of view since its bugging me for 2-3 days its starting to get big. So.. the problem is.. I have in MFC 2 dialog boxes. Each dialog box has one … | |
Hello everyone, I am writing a program in Visual C++, using VS 2008. This is what I want: I press a button, which begins an infinite loop, that does something (approximately) once per second until the user tells it to stop. The problem I am having is finding a way … | |
hi every one i'm pretty new to programing so i want ur help. i want to create a program that counts the number of the downloaded bytes form all ur activity over the internet. that is when ever the internet connection is established the program starts to count the bytes … | |
Hi everyone. I am a beginner at C++ and am having some problems with the language. I would appreciate any advice that could be given on this issue. I cannot figure out how to modify variables! Take this for example. Say you have four variables, 1A, 1B, 1C, and 1D. … | |
Hi all. This has been bugging me for hours. I do a simple text book passing of a filehandle to a function and get a bundle of errors. my func : int appendVVmatrix(VVdouble &mat,ofstream& outF){ if (outF.is_open()){ for (int i=0; i<mat[0].size();i++) { for (int j=0; j<mat[0].size();j++) { char num[40]; sprintf(num,"%f",mat[i][j]); … | |
Please Help me to Solve This Problem.. | |
dear all, Im new in C++ programming. Recently, im doing a login page using Microsoft Visual C++ 2010 Express and Microsoft Access as database. Im trying to connect ODBC to my system but there was a lot of error occur. Can somebody explain me what my problems... [B] This is … | |
Hello again, I will go straight to the point. I have two files one that is called student.dat and the other is called grades.dat . Student.dat has the following items in it : 20092112 Anthony Haykal 20084564 John Doe 20075640 James Bond 20045678 Cynthia Smith 20092134 Jennifer Hajj grades.dat has … | |
Hi everybody, is there a simple way to print a floating point number in its internal representation (i.e. binary or hex) in C(C++)? Yet another question -- is there a linux utility to do the opposite thing with a binary file (i.e. choose a range of bits and convert it … | |
Here is my code : #include <iostream.h> int main (int argc, char * argv[]) { struct { short Signture; long FileSize; short Reserved1; short Reserved2; long ImgDataStartOff; long InfoHeaderSize; long Width; long Height; short Planes; short NumbOfPix; long Compression; long SizeOfImgData; long HRes; long VRes; long NumOfCol; long NumOfImpCol; } … | |
Hi all, first time posting here, I need some help with this, as my knowledge of c++ is shaky at best. I have points defined like this: [CODE]struct Point { double x, y, z; };[/CODE] I have a 2d vector filled with vectors of these points: [CODE] vector< vector<Point> > … | |
I was wondering whether it was possible to use dynamic memory or something else to achieve something to the effect of entering numbers or a string using standard input without first having to specify how many instances you intend to enter. If this can be done through some other method … | |
I have a custom .Ini file that looks like this : [QUOTE] [Main props] lives=3 name=danny [Mommy props] lives=2[/QUOTE] I want to know how to read from the "Main props" section and assign a new value to the "lives" key and also reading from the "name" key. I dont know … | |
I want to know how to make a Bot, regardless game bot or not, I want to know how to move the cursor and how to pinpoint it's destination, how to differentiate between right click and left click. I want to know all about Bot making. Any 1 could help … | |
Hello everyone, i'm new in c++ and i found a problem when created a code. I want to create a code which read from file .txt and then count the number of each value of the attribute, as the text file below: the attribute is'bembi' and the value is '1,2,3'. … | |
Hi When I run this program instead of getting the values I initialized with the constructor, I get -858993460. I guess it's wrapping around in some way. Anybody have an idea? Thanks for your help #include <iostream> using namespace std; class Employee { public: Employee(int Age, int Years, int Salary); … | |
Hi, I'm using Borland C++Builder V5.0. I simply want to pass a variable between two C++ TThreads. I searched a lot on the Internet but can't find anything like that. Simply copying by calling another threads function or property is no option. The compiler thinks it's okay but when executing … | |
I want to optimize the following small integer program in speed. My g++ compiler version is 4.3.4 on 32 bit linux. Please suggest or comment the following ideas. Some ideas are: 1. use compile flag such as -O3 2. rewrite the bigger function with function object [CODE]#include <algorithm> #include <cstdlib> … | |
HIII!!! i need to know how to make a random movement for a character?? [CODE]#include <iostream> #include <conio.h> #include <windows.h> using namespace std; char board[20][20]; void setBoard () { for (int j=0; j<20; j++) { board[0][j] = 219; board[19][j] = 219; } for (int i=0; i<20; i++) { board[i][0] = … | |
I'm having an annoying issue with this code. I get a segmentation fault because of the loop wrapped in comments. Any ideas? This is the goal of this program: First I wrote a simple c++ program and compiled a binary file for it. I then use readelf to dump the … | |
this is NANDHA KUMAR a class 12 student.. i have to do a project in comp science..... :( i have decided to do a project on super market billing or departmental stores billing.... I SHUD DO A PROJECT IN C++ WHICH INCLUDES CLASSES AND OBJECTS..... if anyone of u can … | |
Hello. This is my program: [code]#include <iostream> #include <cstdlib> #include <fstream> using namespace std; int main() { ifstream a; ifstream b; ofstream c; a.open("a.txt"); b.open("b.txt"); c.open("c.txt"); int x; a >> x; b >> x; c << x; a.close(); b.close(); c.close(); system("pause"); return EXIT_SUCCESS; } [/code] In file "a" I have … | |
If i had an Array as seen below, is it possible to use the rand function to randomly select an element within that particular array; if so how can this be done. The Value of the element will be outputted. Any help much appreciated...:) [CODE]int Array[14]={10,10,10,10,11,6,9,2,3,15,11,15,16,15};[/CODE] | |
can any one tell me whats the problem in evaluation of postfix [CODE] #include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> #include<ctype.h> #include<math.h> #define MAX 20 char stack[MAX]; int top=-1; char pop(); void push(char val); int prcd(char symbol) { switch(symbol) { case '+': case '-': return 2; case '*': case '/': return 4; case … | |
| Hello, I have problem using StrToDateTime function from Borland in my project. I made a custom component, it's called Month view (calendar). One of the basic steps of the component's initialization is to set the default month and year. To do this, I use the "1/1/2010" string passed to StrToDateTime … |
Hi, I am using Sparselib++ in this C++ program. [code]#include <iostream> #include <cstdlib> #include "comprow_double.h" using namespace std; int main() { cout << "Sparse example" << endl; // prints Sparse example double val[12]={1,2,3,4,5,6,7,8,9,10,11,12}; int colind[12]={0,1,4,0,1,2,1,2,4,3,0,4}; int rowptr[6]={0,3,6,9,10,12}; CompRow_Mat_double R (5,5,12,val,rowptr,colind); return 0; }[/code] Since I use Eclipse, I have added … | |
How do I generate an 'Out of Memory' exception for testing purposes in c++? I tried real big arrays but the compiler came up with this: "total size of array must not exceed 0x7fffffff bytes" So i tried the maximum limit allowed by the compiler and still no exception generated... | |
how can we make a C++ program that identifies whether the user has input a vowel or a consonant specifically by using the SWITCH structure? i mean its simple with if-else but is there a way it can be made with switch and not if-else? | |
Could anyone point me to a good C++ compiler for Ubuntu, other than Mono. Note that I was using Visual C++ 6. thanks. | |
My delete function set works perfectly for all nodes but the leaves. The program doesn't crash until I try traversal again, not when actually deleting a node. Here is my code: [CODE=c]void BinaryTree::DeleteNode(int deleteItem) { TNode *current; TNode *trailCurrent; bool found = false; if (root == NULL) cout << "THE … |
The End.