49,766 Topics
![]() | |
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? … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 + … ![]() | |
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 … | |
sample output... ex.1 enter a number: 5 ***** ***** ***** ***** ***** ex2. enter a number: 2 ** ** | |
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 … | |
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 … | |
Help me how i connect a sql server 2005 or ms access database with trubo c++ | |
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 … | |
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 = … | |
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 … | |
Hi, i want to make a own linux os. Does someone know where to get the opensoruce? | |
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 … | |
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 … | |
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 … | |
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! ;) | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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. |
The End.