49,766 Topics

Member Avatar for
Member Avatar for vtothau

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 …

0
45
Member Avatar for vavazoom

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 …

Member Avatar for mike_2000_17
0
280
Member Avatar for geryin

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 …

Member Avatar for jonsca
0
68
Member Avatar for newbee3

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

Member Avatar for chiwawa10
0
109
Member Avatar for tawes01

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 …

Member Avatar for tawes01
0
286
Member Avatar for archduke83

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

Member Avatar for archduke83
0
258
Member Avatar for adarbyem

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 …

Member Avatar for adarbyem
0
276
Member Avatar for ahmad deeb

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.

Member Avatar for jonsca
0
41
Member Avatar for localp

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. :(

Member Avatar for Isaac Remuant
0
80
Member Avatar for gpjacks

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 …

0
253
Member Avatar for format_c

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 …

Member Avatar for VernonDozier
0
100
Member Avatar for ace8957

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 …

Member Avatar for ace8957
1
7K
Member Avatar for Hayzam_#include

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,

Member Avatar for Hayzam_#include
0
141
Member Avatar for muze

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

Member Avatar for Ancient Dragon
0
77
Member Avatar for salamjamal10

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 …

Member Avatar for VernonDozier
0
205
Member Avatar for jasleen12345

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

Member Avatar for MattyRobot
0
107
Member Avatar for minskypooh

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 …

Member Avatar for minskypooh
0
198
Member Avatar for rozario2010

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 …

Member Avatar for jonsca
-1
550
Member Avatar for vskumar19

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 …

Member Avatar for Isaac Remuant
0
107
Member Avatar for mca.narender

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 …

Member Avatar for Ancient Dragon
0
145
Member Avatar for dhawalruud

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

Member Avatar for jonsca
0
689
Member Avatar for Hayzam_#include

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 …

Member Avatar for Hayzam_#include
0
99
Member Avatar for georgy9002

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

Member Avatar for gio.perez13
0
152
Member Avatar for rocktea

i have problem .this is have functional if- else, but in functional has functional recursion .is functional has recursion?

Member Avatar for Nick Evan
0
66
Member Avatar for lochnessmonster

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

Member Avatar for mitrmkar
0
117
Member Avatar for blackxswil

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 …

Member Avatar for jonsca
0
121
Member Avatar for Abayiz

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 …

Member Avatar for Abayiz
0
170
Member Avatar for mhaviv

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 …

Member Avatar for NathanOliver
0
92
Member Avatar for vbx_wx

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 …

Member Avatar for vbx_wx
0
144
Member Avatar for gpjacks

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 …

Member Avatar for gpjacks
0
265

The End.