51,592 Topics

Member Avatar for
Member Avatar for dorkwad

Hey,new to stl, in c array, we can declare an array like [CODE]int a[]={2,4,5,6,7,7}[/CODE] how can u do it for a vector without pushing back n times???

Member Avatar for Tom Gunn
0
96
Member Avatar for MervinKoops

Hello, i'm building a server application in C#.net which connects to a MySQL server via ODBC/Connector 5.1 .Net If a execute a query it works but when i try to exectute a query after waiting a while (ex. 5 minutes) i get an error which says: "The connection has been …

Member Avatar for MervinKoops
0
1K
Member Avatar for abhay_pundir

hii , i m getting a problem with save file dialog, i m getting this error "c documents and settings localservice desktop refers to a location that is unavailable' whenevr i click on desktop button.

Member Avatar for Ramy Mahrous
0
111
Member Avatar for ermithun

typedef std::list<LDAPCtrl> CtrlList; typedef CtrlList::const_iterator const_iterator; please help me in understanding the above typedef statements as we know that typedef syntax is, typedef <attributes> datatype aliasname Thanks.

Member Avatar for ermithun
0
202
Member Avatar for tomtetlaw

When my program starts, I want it to put a text edit control in the window, just like notepad, how do i create text controls? I am using the Win32 API.

Member Avatar for kvprajapati
0
43
Member Avatar for zeus1216gw

I'm trying to write a program in C++ that will tell the user to input 5 numbers and it'll display the largest number and whether it was the 1st, 2nd 3rd...so on entry. any help? this is what I have so far #include "stdafx.h" #include <iostream> #include <math.h> #include <iomanip> …

Member Avatar for nirav99
0
102
Member Avatar for jjplaw

Hi, I'm a newbie in this vast world of programming. I've been given some codes in C which are compiled & linked using makefile. I can compile the code using nmake from VS2005. Now i want to build the program in C++ VS2005 IDE. From a quick google search, there …

Member Avatar for jjplaw
0
130
Member Avatar for ermithun

Hello, Can anyone please help me in understanding the below as i need to debug it for finding out the reason for signal 11 in the code, Caught fatal signal 11 (Segmentation Fault) utl_dump_stack: Start of stack trace (using walkcontext) for pid 17461 /data/runtime/mycode/LDAPv3SL/prodlib/libLDAPv3SL_impl.so:std::list<LDAPCtrl,std::allocator<LDAPCtrl> >::iterator std::list<LDAPCtrl,std::allocator<LDAPCtrl> >::erase(std::list<LDAPCtrl,std::allocator<LDAPCtrl> >::iterator,std::list<LDAPCtrl,std::allocator<LDAPCtrl> >::iterator)+0xf4 [ …

Member Avatar for ermithun
0
108
Member Avatar for mrgreen108

I am writing a simple triangle calculation of sides and angles program, and the final thing that the professor wants is the type and the class of the triangle. I have written two functions that are prototyped here: double calcSide( double s1, double s2, double ang3 ); double calcAngle( double …

Member Avatar for mrgreen108
0
123
Member Avatar for lotrsimp12345

//main [code] #include <iostream> #include <cstdlib> using namespace std; #include "libro.h" int main() { test ab; cout<<"enter width limit"; int length; cin>>length; ab.alternate(length); } [/code] //implementation [code] #include <iostream> #include <cctype> #include <cstdlib> using namespace std; #include "libro.h" int test::alternate(int width) { //for odd, 3 char-ellipsis if(width%2==1) { keep=width-3; } …

Member Avatar for lotrsimp12345
0
145
Member Avatar for su_candy

Hi all, I'm working on creating an application whcih acquires image data from camera and display it. I have right now acquired image data in the form of long* array. I would like to visualise this data. I am not sure how to display the array values as an image. …

Member Avatar for su_candy
0
166
Member Avatar for crash1989

I found this question in some programming contest.. Given are N squares with side 1. How many "different" rectangles can one form using these squares? Two rectangles are considered different if none of them can be rotated and moved to obtain the second one. During rectangle construction, you can neither …

Member Avatar for crash1989
0
642
Member Avatar for timos

When I try to compile this code [code] using namespace std; #include <iostream> class COne{ protected: int a; public: bool is_equil( COne & other){ if ( a == other->a) return 1; else return 0; }; int seta(int val){ a = val; return 0; }; }; int main(){ COne a, b; …

Member Avatar for athlon32
0
126
Member Avatar for Stormy_Weather

Hi, We are new to Visual Studio 2008, barely a month into a C++ course, and are currently working on a few personal projects. We have successfully created a console application with Visual Studio but are not sure on how to get the program to run outside of Visual Studio. …

Member Avatar for tux4life
0
235
Member Avatar for lotrsimp12345

the error is on line 32 of my main program //interface file [code] #ifndef STREXTRA_H_INCLUDED #define STREXTRA_H_INCLUDED #include <iostream> using namespace std; class search { public: int find(unsigned char mystring,char letter); int find(char mystring[],string word); }; #endif // STREXTRA_H_INCLUDED [/code] //implementation [code] #include <iostream> #include <cstdlib> using namespace std; #include …

Member Avatar for daviddoria
0
147
Member Avatar for colmcy1

Hey all, need some help on little issue im having. I have 2 programs and I am writing an interface to link the 2 of them in MC VC 6 MFC. There is an input text file to input data for the second program. My dialog interface saves the input …

Member Avatar for u8sand
0
91
Member Avatar for tomtetlaw
Member Avatar for arun_354
Member Avatar for jessejamesjjr

hey guys u no any thing bout tex files........... any thing?? i have a few questions to figure out.......... but if u have any advice on what i need to no wrt figuring out these coding questions please help me... i would gr8tly appr. it.... heres the question: and wrt …

Member Avatar for jessejamesjjr
0
190
Member Avatar for SP IT

This is my final assignment before the semester is over. For this program I am supposed to create a switch within a loop. The switch works but the program will not loop. Can you please help me. [ICODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main(void) { double …

Member Avatar for SP IT
0
105
Member Avatar for redserpent7

Hi As the title suggests I'm having a problem compiling MFC based applications, this problem started immediately after installing the windows server 2003 platform SDK and now even when I try to compile a new MFC project I get the following errors: [CODE] c:\program files\microsoft platform sdk\include\zmouse.h(141) : error C2146: …

Member Avatar for redserpent7
0
245
Member Avatar for san26

can anybody help me on this algo provided below.................... I need a c++ implementation for the following algorithm............. Algorithm RST-T Input: A set of points P = {(xi, yi)} Output: A rectilinear Steiner tree with all points in P connected A. Build an RST-T with horizontal trunk 1. Set ymid …

Member Avatar for Nick Evan
0
132
Member Avatar for arun_354

[code=cplusplus] #include<fstream.h> #include<iostream.h> #include<iomanip.h> #include<stdlib.h> #include<string.h> #include<stdio.h> #include<conio.h> #include<process.h> using namespace std; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; using WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { …

Member Avatar for tux4life
0
131
Member Avatar for EvilDavo

Hi. You've probably been asked this a million times in one form or another but, .... What is the correct way to write a C++ OOP program (eg. for a game)? I've researched the concepts of OOP several times over a long period of time and I have a (seemingly) …

Member Avatar for EvilDavo
0
206
Member Avatar for Sushma21

hi, i am having a problem with file input/output..the file created in the program using open command is not getting listed in the command line directory..also, the file created in one program cannot be retrieved in another program...how do i solve this problem??is this a problem with the operating system?? …

Member Avatar for Sushma21
0
122
Member Avatar for SP IT

I need help with my homework. The first part is to create two arrays that are random. Afterward I need to creat afunction that finds the Minimun and Maximum of the two arrays. Here is my code: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int int main(void) { …

Member Avatar for csurfer
0
120
Member Avatar for lotrsimp12345

its in the num=="-". [code] #include <iostream> #include <cstdlib> using namespace std; int main() { cout <<"enter the problemset and number""\n"; //problems represents name and numbers string problems; char quote; char num; string number; //gather name if(cin.peek()=='"' || cin.peek() == ''') { cin >>quote; getline(cin,problems,quote); } else { while (!isdigit(cin.peek()) …

Member Avatar for VernonDozier
0
202
Member Avatar for krishnampkkm

Hii I wanna copy an NTFs partition to another partition of same type and same size.And I tried with windows function Copyfile() and it worked but slow speed is a problem.Then I did with readfile() and WriteFile() instead of Copyfile() again speed is a problem. How can I get a …

Member Avatar for krishnampkkm
0
174
Member Avatar for gretty

Hi :) I want to start creating windows applications. Can you tell me what editor is best to do this & [B]if I can just start coding right away or do I need to download libraries etc [/B]to do it? I am using Eclipse is this the best editor to …

Member Avatar for gretty
0
301
Member Avatar for SP IT

Now Ineed help combining arrays. Please help. Here's the code Ihave so far. [ICODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int findmax (int a1[45], int a2[50], int i, int j); int findmin (int a1[45], int a2[50], int i, int j); int main(void) { unsigned seed = time (0); …

Member Avatar for Ancient Dragon
0
185
Member Avatar for Jim_b

Looking at using resource files. using Watcom c. Using the Watcom resource editor I output *.res and *.DLG files Any hints on how I produce a *.rc file?

Member Avatar for Ancient Dragon
0
84
Member Avatar for SP IT
Member Avatar for athlon32

I've decided to start my first real project in C++, so I picked something simple; to make a game just like Pong. I've got most of the GUI setup, but i have no idea where to start on programming the computer character that will play against the user. Does anyone …

Member Avatar for athlon32
0
137
Member Avatar for SP IT

I need help on two assignments that are due: 1. Initializing the elements of an array a1 and size n randomly, so that its elements have values between [1-45]. 2. Initializing the elements of an array a2 and size n randomly, so that each element is between 0 and 50 …

Member Avatar for SP IT
0
205
Member Avatar for ludasha

In the first computer, a network is defined with 2 addresses: 1. 192.168.10.12 2. (a virtual address) 182.0.0.1 In the second computer, a network is defined with 2 addresses: 1. 192.168.10.13 2. (a virtual address) 192.0.0.1 in the route table I added lines : 192.0.0.1 ..... (interface) 192.168.10.12 182.0.0.1 ........(interface) …

Member Avatar for tux4life
0
82
Member Avatar for valinux

I have never programmed before or used Linux (didn't even know what that was before a few days ago,) well I got a book for beginning C++ and a book for Ubuntu Linux. My stepdad says it would be best to learn C++ on windows and not to even mess …

Member Avatar for tux4life
0
169
Member Avatar for ramthegreatcv

Consider this code [code=c++] class A{ int i; public: A(){ cout<<"default constructor\n"; } ~A(){ cout<<"default destrutor\n"; } /* uncommenting this causes error A(A& obj){ i=obj.i; cout<<"copy constructor\n"; } */ }; A fun(){ A b; cout<<" address of b = "<<&b<<endl; return b; } int main(){ A a=fun(); cout<<" address of …

Member Avatar for tux4life
0
193
Member Avatar for yun

I want to know that how many Student class objects in a file. plz help me out. Below is a class of Students and 2 function for read and write object in a file, in read function [code] while(in.eof()!= 1){ in.read((char *)&st,sizeof(st)); st.showData(); } [/code] st.showData(); always show the last …

Member Avatar for kvprajapati
0
461
Member Avatar for gretty

Hi I am learning windows programming in C++ . I just did a tutorial learning simply making a window appear & I am surprised by the all the things necessary to make a window appear. Maybe its just the tutorial that is too complicated with unecessary code. Is all this …

Member Avatar for gretty
0
114
Member Avatar for coachHinesfan

Hello all. I have been reading / practising c++ and through the course of my journey I have been encountering some phrases that I don't understand. The phrases are : -> Binary operators -> Unary operators I have tried to search on google and also on other posts in the …

Member Avatar for coachHinesfan
0
136
Member Avatar for dzhugashvili

here is what I want to do: I want to read 104-character strings from a text file, one per line. I want to chop those strings in two, the first 32 characters being a string called schecksum and the last 72 characters being a string called sencdata. Then I want …

Member Avatar for dzhugashvili
0
165
Member Avatar for XTRobot

Hi,first i must say this is not my homework,because i am to young (14 Years old)to have programming homework.I am trying to make application for automation of the dental surgery(i am testing my skills :D),this is the program menu : Ask for username and password and if it's correct it …

Member Avatar for Stefano Mtangoo
0
242
Member Avatar for nahmartin

I don't know how to solve this problem in my code voro.cpp(200): (col. 5) remark: LOOP WAS VECTORIZED voro.cpp(395): same problem voro.cpp(423): voro.cpp(427): I am using intel compiler 10.1 to compile my code the code works fine on dev C++ 4.9.9.2 and V C++ 2008 200 [CODE] for(j=0; j<3; j++) …

Member Avatar for wildgoose
0
216
Member Avatar for u8sand

I made a game, and my friend told me: It doesn't work on linux. I thought it was because when you use VK_SOMETHING that is a value that windows returns when that key is clicked. So... Is their a substitute that I could use, a different function or something that …

Member Avatar for tux4life
0
161
Member Avatar for the_nice_guy

hi I am new in c++ although I am reading about ti for a while now :). recently a made a silly code that I can not compile so please some help about it. ps: befo you even star to read it the following errors ocure while compilling [B]Undefined reference …

Member Avatar for the_nice_guy
2
79
Member Avatar for gretty

Why do I get this error/incorrect syntax? Do you know how I can fix this? [QUOTE] comparison between signed and unsigned integer expressions [/QUOTE] [CODE=cplusplus] for ( int j = 0; j < item.length(); j++) // error ocurs here if ( item[j] == '_' ) item[j] = ' '; [/CODE]

Member Avatar for u8sand
0
306
Member Avatar for yun

I m surprised and wanna know that how the compiler understand the sequence of how data was entered. as i didnt use any space any tab not a new line, how it can point to the original value from a single line..????????? find.txt contain the following line with out spaces …

Member Avatar for Ancient Dragon
0
178
Member Avatar for pmankow

Hello, I am looking to make a program that will generate prime numbers. The program has to start at a specific number, ex: 3698741 and then end at another specific number, ex: 9874123. The numbers may never have duplicate digits, ex: 9874122. There will be a set of rules as …

Member Avatar for WaltP
0
106
Member Avatar for kspriya01

Hi, I want datagridview in windows application(C#.net), type in "this is the first line allows the 50 char", if you press "letter" and type "this is the second line", the current cell and go to the cell right below it. What I want is, when I press "letter" and type …

Member Avatar for kvprajapati
0
145
Member Avatar for dombit

ok, i am new to c++ and i am trying to build a digital sound genorator using Beep(x,x) this may sound like a trivial question but it is one i am having difucutty with. (perhaps i am entering the wrong search peramiters) how to you make a visual c++ consol …

Member Avatar for MosaicFuneral
0
106

The End.