49,761 Topics

Member Avatar for
Member Avatar for divineelite

I am trying to get to the "Wireless Network Connection" which we can normally get to by right clicking on that pc icon in the system tray & selecting the "View Available Wireless Networks" option. Is it possible to bring up that window through code using Windows SDK? I tried …

Member Avatar for divineelite
0
202
Member Avatar for SakuraPink

Hi there, I am writing a program that is taking a number and finding its cube roots and then prints out whether the result is an odd or an even number. I have written the following code but for some reasons it is not giving me the right answer. Could …

Member Avatar for SakuraPink
0
215
Member Avatar for Mahkoe

I have a union named un. I have a un* named up that is the address of a un named u1 (bear with me). The pointer works fine, but I can't pass it to a function. Any alternatives? Here is some code to illustrate (please tell me if there is …

Member Avatar for Mahkoe
0
1K
Member Avatar for sirko

Hi everyone! I wrote code for the progress bar but the thing is that it is just an empty bar and nothing goes on. So how can make it update? [CODE] #include <windows.h> #include <commctrl.h> #include "Resource.h" //--------------------------------------------------------------------------- RECT rcClient; HWND hWnd; HWND hProgress; HWND hDlg; HINSTANCE hInst; int pb_pos; …

Member Avatar for kerp
0
838
Member Avatar for henrimontreal

How can I detect a palindrome as complicated as "A man, a plan, a canal, Panama!" without using erase() and just ignore the spaces and punctuations? The current version is: [CODE] #include <stdlib.h> // system pause //#inlcude <ctype.h> // for toupper() #include <iostream> // input output #include <string> //#include <algorithm> …

Member Avatar for vijayan121
0
124
Member Avatar for Labdabeta

Just wondering which of these functions would be faster (or if they would be the same): [CODE]class MyClass { private: bool MyVar; public: MyClass &Function1(bool MyVar); MyClass &Function2(bool MyVar); MyClass &Function3(bool var); }; MyClass &MyClass::Function1(bool MyVar) { this->MyVar=MyVar; cout<<MyVar; return *this; } MyClass &MyClass::Function2(bool MyVar) { this->MyVar=MyVar; cout<<this->MyVar; return *this; …

Member Avatar for Labdabeta
0
102
Member Avatar for NiTeHaWk4787

Hey everyone, I'm having some trouble writing this program using queues. The main issue that I'm having right now is that I have three queues, each is size=5. The user inputs a number to remove from a queue. The program will pop all the values out of the 3 queues …

Member Avatar for NathanOliver
0
116
Member Avatar for pcgamer2008

Hello World ! I have problem regarding configuration of OPenAL in Dev c++. I have included openal32.dll in system32(Windows), alut.dll in system(windows folder), included alut.h,al.h in AL directory (c:\dev cpp\include\AL) as well and linked all the files viz. -lopenal -lalut. but the source code is not getting compiled..What's the problem. …

Member Avatar for Stefano Mtangoo
0
422
Member Avatar for MareoRaft

[CODE]int operator%( double a, double b ){ int aa = (int) a; int bb = (int) b; return aa%bb; }[/CODE] gives me an error message "must have an argument of class or enumerated type"! As you can see, I want a simple program which truncates doubles into their equivalent integers, …

Member Avatar for NathanOliver
0
7K
Member Avatar for tow3lie

Hello,software comrades! I have a task to do, and I have figured some part of it,but I have troubles with it.So i am writing and asking for some advice. The task is as it follows: You are to create a program (C++ language) in which u enter a number (preferably …

Member Avatar for MareoRaft
0
185
Member Avatar for killingmonk

OK, I looked for a noob section to the forum, but didn't find one. So here's my issue. I'm doing an exercise from a text book for a class I took two years ago. Back then, this wouldn't have been an issue. Now, having not looked at C++ for all …

Member Avatar for killingmonk
0
220
Member Avatar for MasterGberry

So i am a very fluent C++ programmer, and am switching over to PHP/Javascript/MYSQL for some new work that I am doing. I know all the basics of C++ and some of the more advanced STL libraries. I know very basic PHP simply cuz I already know all the arrays, …

Member Avatar for chrishea
0
510
Member Avatar for Triarius

Hi! I am trying to make a simple "Guess my number" game. For some reason the compiler (Visual Studio 2010) gives me an error. Here is the full code : [CODE]#include<iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int tries = 0; int input; srand(static_cast<unsigned int>(time(0))); int …

Member Avatar for vidit_X
0
100
Member Avatar for jeffpro

2 Questions: 1. How is the windows cursor drawn? ddraw? I don't understand and I can't find any information on it. 2. When you control alt delete in windows 7 how is that screen drawn? Thanks

Member Avatar for jeffpro
0
193
Member Avatar for eng hassan

[TEX]This is a game i have made, but I have some problems in the breed & eat functions I dont know what is the problem & i really need help. the code works probably but the prey & the predator doesnt breed or eat,,,ANY HELP PLZZ[/TEX] [CODE]#include <iostream> #include<windows.h> #include<conio.h> …

Member Avatar for raptr_dflo
0
1K
Member Avatar for laim

Hi, I have to build a matrix class with functions that you would expect, Im wondering if anyone can tell me why one or both of these functions arent working correctly? Basically a test harness is run against them to check so the data is random. Im sure it is …

Member Avatar for laim
0
126
Member Avatar for jbennet

HI. I'm reading in a wave file and writing it to a sound device using ALSA. Im not a C++ guy (C#) so not very handy with its file I/O methods.. Any idea how do i change : [code]int rc = read(0, buffer, size);[/code] To work with any file i.e. …

Member Avatar for raptr_dflo
0
3K
Member Avatar for kumarmpk4u

Hi all, In my MDI when i try to execute i am getting an assertion error pointing to wincore.cpp line 311. [CODE]BOOL CWnd::Attach(HWND hWndNew) { ASSERT(m_hWnd == NULL); // only attach once, detach on destroy ASSERT(FromHandlePermanent(hWndNew) == NULL); // must not already be in permanent map [/CODE] here is the …

Member Avatar for raptr_dflo
0
870
Member Avatar for yah2009

[B]hi help me in resolving these questions [COLOR="Red"] 1. Write a program which finds the factorial of a number entered by the user. (check for all conditions) (Beginner). 2. Develop a program to convert currency X to currency Y and visa versa (beginner). 3. Write a program that print out …

Member Avatar for Nick Evan
-2
145
Member Avatar for Batch File

I am new to the c++ programming language and I need help. So I have created the program in the extension .cpp ,but how can I run it, its just text! Is their anyway I could run it as a program from command line or an executable file? Plz help. …

Member Avatar for Batch File
0
149
Member Avatar for eman 22

I have an integer array and I want to fill it. [CODE] int* a=new int[7]; [/CODE] but I want to check at first if the element a[i] is set before or not. Ex. a[3]=2; a[3] has value but all elements in a hasn't have any value until now, How can …

Member Avatar for Narue
0
84
Member Avatar for hntdtt

Help me please. My PC is connected to a Olivetti printer through COMM1 port and I installed driver for the printer, but after do this, i can not program to open comm port in C#. The Error display: The given port name does not start with COM/com or does not …

0
32
Member Avatar for FiToKa

Hello, everybody. I'm having some terrible task for homework and I'm just out of my mind. Here it is: [I][COLOR="Red"]Define a class Deque that represents a deque of strings by keeping its elements in a dynamically allocated array (with maximum capacity) and make the deque as a "circular array" (the …

Member Avatar for FiToKa
0
137
Member Avatar for ssesham1

Hi, I want to use a template function that is used to convert strings to numeric types in a non-templated class. I have: [CODE] class Reader { ... template <class T> T ConvertString (const std::string str); }; [/CODE] Is it possible for me to define the template function in an …

Member Avatar for thekashyap
0
411
Member Avatar for XMasterrrr

Hello guys as i see this is a little error and i don't know how i can't fix it so the following are the main and the header file from the book i learn from: main: [CODE]#include "../std_lib_facilities.h" int main() try { vector<int>numbers; int number; cout << "Enter the numbers …

Member Avatar for Salem
0
411
Member Avatar for Seaboot

I am interested in learning simple 16 bit interaction of code between Turbo C++ 3 and Masm 6.11. Could anyone describe how that would basically work in terms of what statements in either contribute towards the interaction. Thanks.

Member Avatar for Ancient Dragon
0
259
Member Avatar for XMasterrrr

Hello guys as i see this is a little error and i don't know how i can't fix it so the following are the main and the header file from the book i learn from: main: [CODE]#include "../std_lib_facilities.h" int main() try { vector<int>numbers; int number; cout << "Enter the numbers …

Member Avatar for XMasterrrr
0
246
Member Avatar for merse

I would like to ignore empty line and line started with # [CODE] std::string line; while (getline(input,line)) { if (line[0] == '#') continue; if (line[0] == '?') continue; ... } [/CODE] Where ? is, I would like to put the end line character, but what is it in C++?

Member Avatar for mrnutty
0
213
Member Avatar for dgreene1210

I am only a very beginner and was wondering if anyone can give me some help in determining how to fix the error messages i keep getting when i try to compile. I have been pulling my hair out for 3 days. Any help is much appreciated! attached is the …

Member Avatar for MareoRaft
0
973
Member Avatar for MareoRaft

This program refuses to take foom as input, yet if I were to put "matrix.txt" into the function instead of foom, it would work fine. [CODE]#include <fstream> #include <iterator> #include <sstream> #include <vector> #include <string> // needed? using namespace std; typedef vector<double> Vec; typedef vector<Vec> Mat; Mat readMatrix(string foom){ Mat …

Member Avatar for mrnutty
0
238

The End.