49,761 Topics

Member Avatar for
Member Avatar for viki0077

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 …

Member Avatar for tux4life
0
8K
Member Avatar for jomacho

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

Member Avatar for tux4life
0
125
Member Avatar for leid999

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 …

0
43
Member Avatar for timos

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 …

Member Avatar for ShawnCplus
0
58
Member Avatar for rock9449

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

Member Avatar for WaltP
0
148
Member Avatar for Clockowl

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

Member Avatar for siddhant3s
0
2K
Member Avatar for vazzdoin

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 …

Member Avatar for vazzdoin
0
84
Member Avatar for ZephyrTR

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 …

0
43
Member Avatar for andreasd

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 …

Member Avatar for Ancient Dragon
0
101
Member Avatar for pandytheprince

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 …

Member Avatar for pandytheprince
0
264
Member Avatar for xcorpionxting

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 …

Member Avatar for Nick Evan
0
152
Member Avatar for ha_rini

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

Member Avatar for John A
0
178
Member Avatar for tomkeeee

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

Member Avatar for tomkeeee
0
165
Member Avatar for group256

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

Member Avatar for group256
0
163
Member Avatar for nexocentric

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 …

Member Avatar for nexocentric
0
189
Member Avatar for Fouly

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 …

Member Avatar for Fouly
0
354
Member Avatar for JAGgededgeOB172

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

Member Avatar for nucleon
0
171
Member Avatar for Stefano Mtangoo

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!

Member Avatar for NicAx64
0
436
Member Avatar for Exussum

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 …

Member Avatar for ArkM
0
150
Member Avatar for ellimist14

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 …

Member Avatar for ellimist14
0
96
Member Avatar for Duki

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 …

Member Avatar for Duki
0
275
Member Avatar for sammyk

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 …

Member Avatar for sammyk
0
98
Member Avatar for Sky Diploma

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 …

Member Avatar for MrSpigot
0
258
Member Avatar for DeepakkumarD

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.

Member Avatar for marco93
0
77
Member Avatar for Crago3

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

Member Avatar for Narue
0
175
Member Avatar for tones1986

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 …

Member Avatar for Sky Diploma
0
140
Member Avatar for pranjalkumar

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?

Member Avatar for ArkM
0
164
Member Avatar for freddyfly

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 …

Member Avatar for freddyfly
0
226
Member Avatar for DaveD3

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 …

Member Avatar for Ancient Dragon
0
104
Member Avatar for daviddoria

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

Member Avatar for Narue
0
116

The End.