49,766 Topics
![]() | |
Like the title says, I'm having issues creating a tooltip for one of my controls in my dialog. This is what I have: [CODE] HWND CreateToolTip(int toolID, HWND hDlg, PTSTR pszText) { if (!toolID || !hDlg || !pszText) { return FALSE; } // Get the window of the tool. HWND … | |
I'm working on a project that utilizes producers and consumers for an operating systems class. Each producer and each consumer will be its own thread. The producers will generate records that will be stored in a global buffer, in which the consumer will then access to use the data. I … | |
Write exactly four lines of code which declare one vector and one string (of any size and value you choose) and print their size to the console using a call to a member function of each variable’s respective class. I would write a sample but I dont really have much … | |
Hello, I need help on writing a C++ program that allow the user to input two values: a username and a password. Below is what I have so far to test the password and it is not working. #include <iostream> #include <string> #include <vector> using namespace std; int main () … | |
![]() | I'm using Dev-c++ to make a dialog-based app. I had it working, but now I am getting an error: An Access Violation (Segmentation Fault) raised in your program. I have narrowed it down to the winmain function: [CODE]int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow) { if (iCmdShow … ![]() |
hello, im just trying to translate a 1d TV denoising function for matlab, which can be found here [URL="http://cnx.org/content/m31292/latest/"]http://cnx.org/content/m31292/latest/[/URL], to C++. Here's my attempt: [CODE] inline vector<double> tvDenoising(vector<double> data, double lambda, int Nit) { vector<double> J (Nit); int N = data.size(); vector<double> z (N-1); fill (z.begin(),z.end(), double(0)); vector<double> diffZ (N-1); … | |
Hi all, the search function failed to yield any results for me so I come here to create a new thread. I'm learning C++ on my own (sort of a weird hobby of mine to learn code, don't ask) and had an interesting question... Consider the following: Ingredients.h [code=c] #ifndef … | |
a program that prompts the user to insert a positive integer number and send it to a function that will prints all the prime number from 0 to this number. Hint: use nested for loops. | |
I need some help to write to a MySQL database using C++. any basic tutorial will be appreciated. I did google but couldn't find a beginner tutorial. I am sort of lost here. :( | |
This is a program which declares two vectors of 6 elements each of type double. One vector is named weight and the other is named rate. The program uses a loop to prompt the user for a weight in ounces and a postage rate for that weight and then stores … | |
![]() | can any one identify any problems in my code? it keeps crashing once it reaches the else condition. [CODE]void path(char paths[][70], int sROW, int sCOL, int fROW , int fCOL) //recursive path function { if (paths[sROW][sCOL]=='E') { for(int i=0; i<20; i++) { cout<<endl; for(int j=0;j<70; j++) { cout<<paths[i][j]; // display … |
Hi all, So I have reached a kind of impasse on my current project. I'm trying to make a program that can function like a phone book, loading information from a file into a binary search tree and performing operations on said information. The issue I'm having appears to be … | |
Hi i wanted to make a software that can "Off" and "On" a computer fan connected with a usb can i make it in c++?? i have 1 year experience doing C++ Thanks, | |
hello guys...i am trying to compile this project but getting this error. I have specified all the neccessary libraries and include files but I dont know why it is looking in wrong direction and showing me these errors It says [B]LINK : fatal error LNK1104: cannot open file '..\..\..\wrong path\src\debug\file_name.lib[/B] … | |
Hello all, Please help me if you can: my question is [B]what is the efficiency of the queue's insertion and deletion operations when the ADT list's implemetnation is a. Array-based b. Pointer-based[/B] Give me a hint if you can. I am new to the C++ world so please forgive me … | |
[CODE] #include<iostream> #include<cstring> using namespace std; class city { protected: char *name; int len; public: void getname(void) { char *s; s= new char[30]; cout<<"Enter city name: "; cin>>s; len= strlen(s); name= new char[len+1]; strcpy(name,s); } void printname() { cout<<name<<"\n"; } }; int main() { city *cptr[10]; int n=1; int option; … | |
The problem is to create a console-based program that prompts the user for name, student number, course, and grade (50-100 whole number only). After the input, a message should be displayed depending on the grade. The program should display an error message and terminate immediately if there is an invalid … | |
hello -i'm a student and i have been given the task to develop a P2P Voip application. - the program should work on Local network and adhoc network (and internet if possible) without server. -The program should have an address book to add unlimited user name with the ip and … | |
Hi all, I have a structure for which array of objects are created Now i want to return that array of objects to a function just like below: struct mystruct s[5]; . . code . return s; in the function i captured using *s void myfun(mystruct *s) but i am … | |
Hi, I am working on a VC++ (Visual Studio 2008) Module and i am new on this module. This module is working on 32bit fine, i need to convert this in 64 bit. I installed x64 bit compiler and select 64 bit in Project Properties. I got following error while … | |
[code] #include<iostream.h> #include<conio.h> #include<iomanip.h> #include<stdio.h> #include<stdlib.h> #include<fstream.h> #include<string.h> int n=0; // current no. of players ( to add to next one) int num=0; // total number of players class date { public: int dd; int mm; int yy; }; class players { public: char name[30]; date dob; char userid[30]; char … | |
Hi i am new to qt but i have programing experience in c++ in dev - c++ after i moved to qt i thought i could start like this if i press a button it should output hello world it is just showing me 1 error system was not declared … | |
Hi all; I need help with a program, where its a game where users are to guess a randomly selected number. The user has a max of 1 - 100. [code] class CScoreboard { private: string players_name; int round; int guess_avg; int total_score; public: CScoreboard() { players_name =""; round = … | |
i have problem .this is have functional if- else, but in functional has functional recursion .is functional has recursion? | |
for some reason the createremotethread() function is failing when i try it on calc.exe, or notepad.exe....when i use getLastError() it returns an error code of 5 : ACCESS_DENIED anyone have any ideas how/what i am doing wrong? and yes i am using OpenProcess(CREATE_THREAD_ACCESS, FALSE, ProcessID); -thx | |
Can someone point me where did i do wrong on the coding below? [CODE] class Course { private: string nameCourse; <-- is this correct? int totalOfCourses; public: void registerCourses(string course[], int numberOfCourses) { totalOfCourses = numberOfCourses; for(int i=0; i<totalOfCourses; i++) { nameCourse = course[i]; } } void displayCourses() { cout … | |
Hello! I am trying to read some data from an existing .txt file, actually that data consists of three columns, and dozens of raws. I can read it and write it to another new .txt file, but the problem is, it generates only one column with all those data, which … | |
Hi all, I have written a simple function to compute factorial in C++. It computes OK until 31! which is 738197504. Now for factorial 32 it gives me a negative result and for 34 it gives me 0. I know that on my machine LONG_MAX is 2147483647. So in my … | |
I`m getting the following error in my code(line 65): [code] error: expected constructor, destructor, or type conversion before ‘*’ token [/code] [code] namespace SocketSpace { class Error { public: Error(const std::string& msg = 0) throw(); const char* what() throw(); ~Error() throw(); private: std::string message_m; }; class Socket { public: void … | |
So, I am in the mid part of my C++ class and am having trouble with a vector project at the end of the chapter. I don't expect the answer, but if someone would point me in the right direction I would greatly appreciate it :) #1). Write a loop … |
The End.