49,766 Topics

Member Avatar for
Member Avatar for mrcpp

I want to create my own widget toolkit, and I know it's possible without external tools(QT was written in C++, and so was wxWidgets). But I don't know how to do it, and I couldn't find anything in Google. So how exactly do I create GUIs in C++ that way? …

Member Avatar for Ancient Dragon
0
416
Member Avatar for n8thatsme

Ok, my problem is that I'm reading from a file 3 values, a last name, first name and salary, for example: Key Bobby 43000 I have an array of objects for each person, so I neeed to read this file and assign the last name, first name, and salary to …

Member Avatar for mike_2000_17
1
4K
Member Avatar for empror9

hello, i'm trying to write two classes (vehicle and driver) first i want to create the class vehicle and it's attrbutes, but there is a problem when i compile the code. please see all my code [CODE]#include<iostream> #include<vector> using namespace std; // // Vehicle: Vehicle number, type, capacity, driver assigned …

Member Avatar for mike_2000_17
0
192
Member Avatar for 2Dcube

Hello, I have to make a small game in C++ as a school project. Now, although I've made many 2D games before I'm very new to C++, and I ran into a few problems. One: I need dynamic key input. I now use getch() and it makes the program wait …

Member Avatar for WaltP
0
2K
Member Avatar for Mast3r67

Ok, so this is how things stand now. I've read few books about C++ console programming, C++ console game programming, I'm doing C++ on school and I can say I'm pretty good at it. Now, I'd like to move on the next step, to program in C++ with graphics, sound, …

Member Avatar for mike_2000_17
0
183
Member Avatar for goluman

I am a beginner in openCV and C++ as well.I am stuck in a particular place while trying to implement face recognition in open cv. I have the stored training images in a folder called data the images of first person is stored like 1_john1.pgm 2nd image of first person …

Member Avatar for goluman
0
1K
Member Avatar for jimFan

Dear all, I experienced an unexpected error when using getline() to get input from a file like this: a.out < inputFile Part of the code is shown below [CODE] ........ while (true) { cout << "Enter a command: "; getline(cin, input); cout << input << endl; } ......... [/CODE] The …

Member Avatar for p9v9n261
0
461
Member Avatar for Mahkoe

I've been coding in c++ for a while now, and I use string variables quite a lot. One day, I stumbled upon a char* which can also be used to "store" a string of characters, and it's been bothering me ever since that I don't really know what a string …

Member Avatar for Mahkoe
0
182
Member Avatar for creative_m

I want to define a vector of TextBox (or any compnents) in VC++ project (windows form). I wrote : [code] std:vector <TextBox^> txt_box; // //then I push the elements back in the vector using txt_box.push_back (textbox1) // //... // for all the text_boxs in my form [/code] but this code …

Member Avatar for Ancient Dragon
0
289
Member Avatar for aiwasen

The problem is this. I try to enter the limit of at least 34 fibonacci numbers but the limit display the limit of 89. [CODE]#include <iostream> using namespace std; int main() { int x=0,y=1; int num; cout<<"Enter number:"; cin>>num; cout<<x<<" "<<y; while(y<=num) { x= x + y; y= y + …

Member Avatar for HASHMI007
0
184
Member Avatar for Daita
Member Avatar for Kerlix

I've found a simple timer program and it seems to work (for the most part). The problem is that certain cout functions aren't showing up. The timer originally didn't include milliseconds in the code, so I added them myself (which could be the problem) based on the code for the …

Member Avatar for Kerlix
0
287
Member Avatar for aomas98

sample output... ex.1 enter a number: 5 ***** ***** ***** ***** ***** ex2. enter a number: 2 ** **

Member Avatar for Rashakil Fol
-2
175
Member Avatar for reallyslick

I have about 50 different tags, each is at most 2 chars in lengnth. depending on the input of the user a combination of tags will be joined together into one large string. Is there a simpler/more efficient way then having 50 different if-statements? for that matter, how is a …

Member Avatar for reallyslick
0
187
Member Avatar for MareoRaft

1. In a for or while loop, if the condition is breached in the middle of the brackets {}, will the code immediately stop the loop, or wait until it gets to the bottom of the brackets {} ? 2. If a function is called in my code, does the …

Member Avatar for svilla
0
95
Member Avatar for amitmardana
Member Avatar for hqt

I'm using DevC++ 4.9.9 and have a problem while I'm debugging: I want to view array C so I will: press F4 and type C. but for my example: if my code is: [CODE]for(i=1;i<=10;i++) for(j=1;j<=10;j++) c[i][j]=10;[/CODE] the left panel (that I saw value) will have 100 line of C. (each …

Member Avatar for pseudorandom21
0
144
Member Avatar for Peter4n31

Memory Validator reports a problem: Accessing C++ object functions with a pointer to a deleted object. It is pointing to prefDir = preferredPath; in Loader.h Public: is defined: [CODE] std::vector<std::string> preferredPaths; [/CODE] in Loader.ccp [CODE] CDirLoader::GetFileExtHandle(not related params) std::string prefDir; for(size_t i=0;i<preferredPaths.size();++i) { const std::string& preferredPath=preferredPaths[i]; if (!preferredPath.empty()) prefDir = …

Member Avatar for Narue
1
156
Member Avatar for deliezer

Hi I am trying to write something that compiles and runs correctly on both Linux and Windows. I am running bash in Ubuntu on Linux, and I try to set environment variables in the makefile just before the compile lines. I then write something in the code like [CODE] int …

Member Avatar for deliezer
0
2K
Member Avatar for eoop.org

Hi, i want to make a own linux os. Does someone know where to get the opensoruce?

Member Avatar for eoop.org
0
133
Member Avatar for hqt

I'm sorry because I think this is a popular fault but I haven't found why it happened yet. this is a code that has that fault: [CODE] void readfile(){ FILE *f; int u,v; f=fopen(fi,"r"); fscanf(f,"%d%d%d%d",&n,&m,&s,&t); for (int i=1;i++;i<=n) for (int j=1;j++;j<=n) c[i][j]=(i!=j)? Oo:0; for(int i=1;i++;i<=m) fscanf(f,"%d%d%d",&u,&v,&c[u,v]); fclose(f); } [/CODE] when …

Member Avatar for hqt
0
624
Member Avatar for riotburn

I am writing a polynomial class but the code I have written to overload the ostream operator<< goes into a infinite loop for the first term. I tried to step through but Visual Studio 2010 goes into linker(?) code instead of only stepping through my code. (How to change the …

Member Avatar for riotburn
0
116
Member Avatar for Ronene

Hi guys, I need to create two separate applications in C++ , where the first application is a window , and the second application has a button and it needs to close the first window. Both applications must be two separate programs ! [B]I can't use FindWindow()[/B] therefore , I …

Member Avatar for JasonHippy
0
228
Member Avatar for MareoRaft

when I... [CODE]double a = 0.00000001; cout<< a <<endl;[/CODE] The computer outputs 1e-07. I want to force the computer to write it as 0.00000001 thanks! ;)

Member Avatar for MareoRaft
0
200
Member Avatar for sadsdw

Hi there, I need to change columns to rows and vice-versa. Example: 1001 AA AB AC AD 1002 CC DD EE FF 1003 AA BB CC CC 1004 DD DD DD DD to 1001 1002 1003 1004 AA CC AA DD AB DD BB DD AC EE CC DD AD …

Member Avatar for sadsdw
0
221
Member Avatar for rluo502

Hi, I am writing a code to sort a list of C-strings in a 2-D array. I'm a beginner and it isn't working out. The program crashes every time. After running a bit of testing, I found that the for loop in my sort function is not incrementing the variable …

Member Avatar for vmanes
0
230
Member Avatar for sadsdw

Hi friends, I'm looking for an efficient method to transpose rows and columns from a BIG file. I wrote this code but is very inefficient. In that, I'm closing and opening a file many times. (// #*#) Could anyone help me please? Thanks a lot! [CODE] ifstream testTranspose; testTranspose.open("data.txt"); int …

Member Avatar for Ancient Dragon
0
142
Member Avatar for singaiah39

Hi All, We have some problem in calling Peernet TIFF printer. Issue: We want to send TIFF images to Peernet printer and convert them to get new TIFF images. We used ShellExecute functionality to send the TIFF files and create the new TIFF files. But every time, dialog box is …

0
83
Member Avatar for afi@alvi

Hi! All.. It is asked that Can a C++ programme be converted to an i-phone app?, by means of any converter or something like that.

Member Avatar for mrnutty
0
192
Member Avatar for josh327

Hey guys, I'm trying to make an elevator simulator. It shouldn't be anything complex; just a basic 4 story building. Also, the highest level of coding used should just be structures and pointers. I need help as to where I should start.

Member Avatar for Narue
0
92

The End.