49,761 Topics
| |
I'm really a beginner in C++ programming, and the above problem is just a part of c++ excercise. Can somebody give me a tip how to implement this in C++? The biggest problem for me is to implement and write this: • red+yellow light on cat traffic light is 2 … | |
Hi, this is my first post here. The fact is i'm not a programmer and i need help. I have a software that i need to solve a vehicle routing problem for my thesis. But i only got the source code for it, one header file and 6 cpp files. … | |
Hi: I have a C++ program in which I generate a window to show my progress. I design that the window will maintain until I click "OK' button on it after all process done. However, it is always automatically shut down before I can see the OK button. I tried … | |
Is it possible to use web browser as GUI for C++? Possibly use Google Chrome as GUI instead of windows API. I would rather stay away from learning the windows API mess. I just need to get some inputs from user, and spit out a picture to the screen and … | |
i am a bit confused on how to start this i have to write a for loop to read in 10 number , write bubble sort having 2 nested for loops and writing a loop to output to sorted array [code] int main () { int total_neg=0;// intialize int total_pos=0; … | |
Hey guys, I got this code, and I can't get it to compile, no clue what I'm doing wrong. [code=cpp]#include <iostream> #include <vector> #include <iterator> using namespace std; template <class T> void kill_dupes(vector<T> &x){ vector<T> y; for(vector<T>::iterator it = x.begin(); it != x.end(); it++){ if(find(x.begin(), x.end(), *it) == x.end()){ y.push_back(*it); … | |
Hi i want to read the colon separated values from a file as given below. Name : VIjay city : XYZ Address : ABC etc etc . . these are the entries in a file and i want to read and save the name and age ie,vijay, XYZ etc etc … | |
Hi everyone, I am a newbie both on this forum and Borland C++ and hope you can help me to figure out the problems which I encountered during my project. Here we go, I wrote a program that reads SysLog messages and store it in a database.These log messages are … | |
Hi there. I do have close to the same issue. When I fist run my application it connect successfully to serial port. Now my app can receive and send data. But when I close my app I has some issues running again. It looks like it goes into a tight … | |
Hi I first i new here hope this correct place to post. I currently making a 3dsmax load which converts a 3ds file to direct x file so it can be loaded. My problem is that i using a old .exe file called conv3ds.exe which when used in cmd would … | |
I need to write a function in C++ that does the following: -Reads an audio file as input (preferably in Mp3 format). -Calculates the average frequency (Hz) and the tempo (bpm) of that file. -Stores the average frequency and tempo for future use. Any idea on how to write such … | |
Hi, I am calling a c call back function in c++ member function.which works fine.Now I want to call some c++ non static member function in this c call back function.How do I do that.Can please somebody help me. Thanks, Harini | |
[code=c] // lokalasss.cpp : Defines the entry point for the application. // #include "stdafx.h" /*int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. return 0; } */ //////////////////////// [/code] // ddd.cpp : Defines the entry point for the console application. // [code=c] #include … | |
Hello everyone, I'm pretty new here. I'm facing a problem, the compiler says "Segmentation fault". Please take a look at the code and tell me where I'm going wrong. I tried hard to figure it out, but I couldn't. Thanks a lot. [code] int **PointerArray; *PointerArray = new int [LENGTH]; … | |
I'm using the following link to learn how to pass VB string arrays to a C/C++ dll for editing. [url]http://support.microsoft.com/kb/118643/EN-US/[/url] The problem I'm having is, where is the vbapi.h? I've searched my hard drive for it and found nothing. I've also searched the net for where it could be possibly … | |
Hi, I tried the following snippet of code [code] BEGIN_MESSAGE_MAP(CSpeechDlg, CDialog) //{{AFX_MSG_MAP(CSpeechDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_BUTTON_VOICE_TRAINING, OnButtonVoiceTraining) ON_BN_CLICKED(IDC_BUTTON_MICRO_SETUP, OnButtonMicroSetup) ON_BN_CLICKED(IDC_BUTTON_SPEAK, OnButtonSpeak) ON_BN_CLICKED(IDC_BUTTON_ABOUT, OnButtonAbout) //}}AFX_MSG_MAP ON_MESSAGE(WM_RECOEVENT,OnRecoEvent) END_MESSAGE_MAP() [/code] but i got an error at this line: [code] ON_MESSAGE(WM_RECOEVENT,OnRecoEvent) [/code] the error is : [code] Error 1 error C2440: 'static_cast' : cannot … | |
Hi all, My program is supposed to read data from an input file and position the read data into an AVL tree - in alphabetical order. My output at the end is supposed to show each node in this format... i.e. (Current, Current->LeftChild (could be NULL), Current->RightChild (could be NULL), … | |
Just a curious Question. What do you prefer, QT or wxWidgets? How do compare the two in terms of: 1. Nativity 2. Easiness to learn 3. Documentation 4. Weight (The size in MB) 5. Licencing 6. Any other factor(AOF) Thanks all! | |
I'm writing a command-line tic-tac-toe game and i've encountered a problem in my helpMenu() function, whenever i recursively call the function with an argument, the cin.get() pause ceases to work. Any help appreciated, thanks. The following is my test.cpp file, whenever i write some new function i always put it … | |
Ok I'm going to try to be as specific as possible. Here's my input file (at least to some effect): [code] #'s searched 1 3 3100 56801 .52 87925.32 2 Mitchell 1 boudreax 2 1 4 5480 56825 .81 68939.09 0 1 5 8520 56829 .89 10892.40 3 guillott 3 … | |
Hey everyone, I'm trying to work with Sets. I have a function [I]Union[/I] that takes a class type [I]Set[/I] as it's parameter. The function returns the union of class A and B. Here is my code: [code=c++]Set Set::Union(Set setB) { Set result (maxItems); for (int i = 0 ; i … | |
Hello everyone, I really need some help with this project I am working on. So I need to go through a text file to search for a particular string (say something like 'play') and then if that word exists in a line I need to find a string after that … | |
Hello all, I am solving some of the exercises in a new book of C++ I am having trouble in declaring [quote=THE C++ BOOK]A Reference to a array of 10 Integers[/quote] Its on the 19TH and 30th line. I have the total code over here. [code=c++] //Declarations for all the … | |
Hi, I am trying to track all users in my network by getting user name, login time and logout time, I want to pass their machine ip address as my input and get what i need. I use Windows xp os. please assist if you could. | |
[code=cplusplus] // Josh Crago_Chapter 7 Programming pg 458, # 7 #include <iostream> #include <iomanip> #include <string> using namespace std; int main() { char again; do { // Define the varibles char letter = 0; const int SIZE = 81; char line[SIZE]; const int maxLowercase = 122; const int minLowercase = … | |
Hey all, i am working on a project in which i read thw following data file: 6 CSCI240 CSCI241 CSCI241 CSCI340 CSCI340 CSCI480 CSCI480 CSCI580 CSCI340 CSCI580 CSCI463 CSCI480 This data file, consists of the size of array (6) to be created, and then lists the classes, with the prerequisite … | |
I want to create a 16-bit float datatype, allocating memory to exponential and mantissa part at my own discretion. How can I do that? | |
All right...This is my first post and it is a very short question. I'm getting a segmentation fault at this line: [code] std::ostringstream ostr; [/code] All I'm doing is creating an ostringstream. Sometimes it makes it past this line and is fine but others I'll get a segfault here. I … | |
This is my first post. I am trying to use Visual Studio 2003 which is what is available at work. I am having to problems: first I don't seem to be able to set a watch on a variable, the contex menues are grayed out. The second is I am … | |
I tried to do this to redirect the clog output to a file: [code] ofstream ofs("file.log"); clog.rdbuf(ofs.rdbuf()); clog << "Logged." << endl; ofs.close(); [/code] It worked (the file contains the text), but the program segfaults. I read that you have to "restore" the original buffer, so I tried this [code] … |
The End.