49,757 Topics

Member Avatar for
Member Avatar for dinesh.isuranga
Member Avatar for slowlearner2010

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 …

Member Avatar for Ancient Dragon
0
295
Member Avatar for ahaykal

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 …

Member Avatar for ahaykal
0
102
Member Avatar for nsavvinv

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 …

Member Avatar for frodothehobbit
0
6K
Member Avatar for AhmedHan

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; } …

Member Avatar for bala2nd
0
357
Member Avatar for Arlamos

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> > …

Member Avatar for NathanOliver
0
110
Member Avatar for AspiringCoder

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 …

Member Avatar for mrnutty
0
140
Member Avatar for Martje

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 …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for Beeko

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 …

Member Avatar for Beeko
0
180
Member Avatar for sasTReSS

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'. …

Member Avatar for sasTReSS
0
300
Member Avatar for benji_k

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); …

Member Avatar for benji_k
0
104
Member Avatar for dwhvw

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 …

Member Avatar for Rajesh R Subram
0
2K
Member Avatar for albertkao

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> …

Member Avatar for Rajesh R Subram
0
106
Member Avatar for eng hassan

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] = …

Member Avatar for eng hassan
0
580
Member Avatar for dansnyderECE

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 …

Member Avatar for dansnyderECE
0
166
Member Avatar for nannunandhu

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 …

Member Avatar for nannunandhu
-3
118
Member Avatar for XerX

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 …

Member Avatar for XerX
0
175
Member Avatar for God Coder123

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]

Member Avatar for God Coder123
0
105
Member Avatar for Abiha

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 …

Member Avatar for daviddoria
0
114
Member Avatar for Thew

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 …

Member Avatar for Aranarth
0
242
Member Avatar for Sandhya212

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 …

Member Avatar for Sandhya212
0
560
Member Avatar for Crak

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...

Member Avatar for daviddoria
0
108
Member Avatar for maryam ahmad

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?

Member Avatar for daviddoria
0
97
Member Avatar for lewashby

Could anyone point me to a good C++ compiler for Ubuntu, other than Mono. Note that I was using Visual C++ 6. thanks.

Member Avatar for hyperbyte
0
113
Member Avatar for drunkenmonk

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 …

Member Avatar for AkashL
0
129
Member Avatar for gtschemer

Hi, I believe this is my first posting to DaniWeb, so thanks very much in advance for your time! I have been doing some searching and I am not sure of a definitive answer to the following problem. I am attempting to make a class that can store a set …

Member Avatar for Banfa
0
125
Member Avatar for Mike911

I need to prevent my window from going minimized to tray when I click the Minimize-Button. I write in native C++ with additional use of DX10, DXGI, Direct2D and DirectWrite. I proceed the WM_WINDOWPOSCHANGING. But how did I know if its triggered from a Minimize-Button ( WM_SIZE is already too …

Member Avatar for Mike911
0
213
Member Avatar for harish_s

In my code, I am trying to open a directory of Solaris OS from Windows OS using FindFirstFile(). In Windows XP, the code is working fine but in Window 7 same code is not working. FindFirstFile() returns INVALID HANDLE in Windows 7 and GetLastError() return error code 50, which means …

Member Avatar for harish_s
0
234
Member Avatar for broli100

Hi, I try to make graphic editor with buttons on the left and opengl window on right. Currently I have done it like two windows - opengl and that tool bar.But I want it to be in one window like in most of programs. I have looked for it for …

0
60
Member Avatar for ryan858

OK, what's wrong with this? [CODE=C++] int main(int argc, char* argv[1]) { //declare argc and argv to check command-line arguments string arg = argv[1]; //convert char to string if (argc == 2) { //test if arg was entered if (arg == "test") { //test if arg is 'test' printf("you entered …

Member Avatar for Aranarth
0
85

The End.