51,593 Topics

Member Avatar for
Member Avatar for alexa868

Hey... I've written a program that changes a single character from uppercase to lowercase and viceversa but I want to change a whole word from uppercase to lowercase and viceversa how do I do that? [CODE]#include <cctype> #include <iostream> using namespace std; int main() { for (int i=1;i<=10;i++){ char ch; …

Member Avatar for VernonDozier
0
188
Member Avatar for nedsnurb

Hi Guys, I am writing a program which enables the user to enter a size for a square and then they can choose to output it in several ways, clear filled horizontal/verticals lines. The first two I have manged however the latter horizontal/vertical I cant quite get right, as they …

Member Avatar for VernonDozier
0
79
Member Avatar for Death20

I'm a begginner programmer running a windows XP with Dev-C++. Would it be possible to know the syntax to disabling mouse and keyboard input? (I want to disable the mouse first, then later both the mouse and keyboard.) Google's pointed me towards blockinput(), but I can't get that to work.

Member Avatar for Death20
0
291
Member Avatar for JooS

Hi, I have homework assignment to make a minesweeper game using classes. In that game I have 3 lives,when I enter coordinates with I loose life,otherwise i get point. Here is how I tried to solve the problem,but I have some errors in it. Can you check it please and …

Member Avatar for JooS
0
122
Member Avatar for ihatestarch

I completed a test today that didn't go so well. The last question dealt with binary files. For the review, he told us we had to go over seekg, tellg, and read and write methods. On the test there was a class that could find a record (with a record …

Member Avatar for ihatestarch
0
101
Member Avatar for red999

I am write a program that both uses inheritance and composition. I am a bit new to inheritance so I am a little confused on some aspects of it. Let's say I have a class definition like this [CODE]class Month { Week *week[4]; }; // class Month class Week { …

Member Avatar for mrnutty
0
111
Member Avatar for Zay

hello ; here is a quastion . i understand it until the red senence , i do not know what dose it mean mathematically ? Write a program that prompts the user to input a positive integer. It should then output indicating whether the number is a prime. Note: an …

Member Avatar for Zay
0
1K
Member Avatar for happygeek

First Google expressed an interest in the [URL="http://www.itwire.com/content/view/20370/53/"]web browser client[/URL] market, and then the [URL="http://www.itwire.com/content/view/26281/53/"]operating system market[/URL] and now it has launched its own open source systems programming language. [URL="http://golang.org/"]Google Go[/URL] is being touted as 'expressive, concurrent, garbage-collected' and promises to produce fast code, fast. According to Google a typical …

Member Avatar for Nick Evan
4
440
Member Avatar for Wong23

Can someone help me with this problem here about Binary Trees. I was given this code... and I am required to write a function void count_nodes(?) to determine the total number of nodes in a Binary Tree.

1
244
Member Avatar for kavithabhaskar

This function does not work either.. error msg is as follows beep.cpp: In function ‘int main()’: beep.cpp:8: error: ‘Beep’ was not declared in this scope please assist! [CODE]#include <windows.h> #include <iostream.h> using namespace std; int main() { Beep (100,100); return 0; }[/CODE]

Member Avatar for donaldw
0
3K
Member Avatar for cool_zephyr

hey there..i'm a beginner in C++ and i'm written the following code using vc++ compiler..actually i took a little help from a book [code=c] #include<iostream> #include<stdio.h> #include<stdlib.h> #include<winsock.h> #define NETWORK_ERROR -1 #define NETWORK_OK 0 using namespace std; int main(void) { WSADATA ws; int nret; WSAStartup(MAKEWORD(1,1),&ws); SOCKET commsocket; commsocket=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); if(commsocket==SOCKET_ERROR) { …

0
70
Member Avatar for angelsherin

hi...I got solution after initializing stInfo..Thank u soooooooooooooooooooo much.....Thanks for ur helping heart... Could u plzzzzzzzz help me to solve another one problem... i have one dll created by using C#.Net...I refered that dll and i could access all the C# methods inside my VC++ applications.. this is the method …

Member Avatar for amit.mcanitw
0
185
Member Avatar for jiten_raulo

I am little bit confuse about this operator. Can any one tell me what does operator -> internally. And what are the importance of -> in pointer? Appreciated in advance for help (all daniweb group).

Member Avatar for dkalita
0
81
Member Avatar for HelloWorld23

Hello -- 1. Can you compile C code in Visual Studio.NET ? If so, can you please submit the proper steps in order to do this. Thank You :)

Member Avatar for shani443gb
-2
4K
Member Avatar for xxginoxx

Hi guys, I hav a problem, may i noe how to link visual c++ with silicon IDE. which is C programming n 8051. i noe i need to use a serial port. after doin tat wads the nex step? thx in advance

-1
45
Member Avatar for RobBrown

Hello, I am having problems debugging a program that was written to decrypt a caesar cipher. The program reads in a text file character by character into an array, determines which character appears most and declares it 'e', then proceeds to determine the "shift" to employ. Currently i have the …

0
84
Member Avatar for angermanaged

I am having a problem wih the compiling of my code. The whole program consists of a driver program and a header file. the problem is showing up around where it is compiling the header file. since the header file only has template functions in it and no input file …

Member Avatar for dkalita
0
120
Member Avatar for Syakoban

Hi, We are web/Flash people but were asked if we can take on a project that I would describe as creating a shell environment for Windows (probably XP), to hide the normal Windows Interface. The idea is for the company's employees to work in this environment and only have access …

Member Avatar for Ancient Dragon
0
99
Member Avatar for steball

I am trying to load a list of image files into an image array. The following code snippet works: Graphics gImage(hdc); Image iTiles[intNumTiles] = {L"Image[0].jpg", L"Image[1].jpg", L"Image[3].jpg", ...}; gImage.DrawImage(&iTiles[0], 100, 50); gImage.DrawImage(&iTiles[1], 140, 90); gImage.DrawImage(&iTiles[1], 180, 130); ... The problem is, I don't know how many image files there are, …

Member Avatar for Ancient Dragon
0
135
Member Avatar for valkerye

I'm having a lot of issues with a program I'm working on and I really use any suggestions I could get. The purpose of the program is to take an input file that has a users name, the number of minutes in their call plan, and the number of minutes …

Member Avatar for vmanes
0
165
Member Avatar for dharanidaran

Hi ! I need the command to compile a C++ Project in Ubuntu. Help me please!! I am able to compile and see the output if created as single source file. In this case I have three file stock.h , stock.cpp, usestock.cpp in a folder which is the working directory. …

Member Avatar for Ancient Dragon
0
162
Member Avatar for valkerye

I'm having an issue with an end of file while loop. I have narrowed a problem with a previous program into a smaller bit of code and the error is in the read in and i hove no idea what to do about it... I have done this kind of …

Member Avatar for Ancient Dragon
0
199
Member Avatar for fiz

#include<stdio.h> void AddMatrix(int[2][3],int[2][3],int[2][3],int,int); int main() { int i,j; int matrixA[2][3], matrixB[2][3], matrixC[2][3]; printf("This Program is to find the summation of matrixA and matrixB\n\n"); for(i=0;i<=1;i++){ for(j=0;j<=2;j++){ printf("Please enter matrixA[%d][%d]:",i+1,j+1); scanf("%d", &matrixA[j]); } } printf("\n\n"); for(i=0;i<=1;i++){ for(j=0;j<=2;j++){ printf("Please enter matrixB[%d][%d]:",i+1,j+1); scanf("%d", &matrixB[j]); } } printf("\n\n"); AddMatirix(matrixA,matrixB,matrixC); return 0; } void AddMatrix(int matrixC[2][3], …

Member Avatar for xavier666
0
105
Member Avatar for mebob

Hi, i have two questions about making a c++ based programming language. the first: is there a c++ function or something that can separate text by commas and parenthesis, so if i wanted to write function [I]foo[/I] with argument [I]arg1[/I] and [I]arg2[/I], i would need code to take foo(arg1,arg2) and …

Member Avatar for mebob
0
102
Member Avatar for donaldw

I am writing a program which should output some frequency shift keyed (FSK) audio. I am using a sin(...) function to find some values to plug into an array of unsigned ints which I am outputting using waveOutWrite with a sample rate of 44100 specified in the header. The values …

Member Avatar for donaldw
0
513
Member Avatar for abie

I am trying to optimize code for Monte Carlo simulation. Even minute performance differences piles up after 100 million iterations and thus I need to squeeze every nanosecond from math operations! One area where I thought I could save a lot stems from the fact that I only require precision …

Member Avatar for mrnutty
0
173
Member Avatar for axed

[code] vector<int> vi(3); for (int i=0; i<vi.size(); i++) { cout << vi[i] << endl; } [/code] output1: 0 0 0 [code] vector<int *> vi(3); for (int i=0; i<vi.size(); i++) { cout << vi[i] << endl; } [/code] output2: 0 0 0 [code] vector<int *> vi(3); for (int i=0; i<vi.size(); i++) …

Member Avatar for mrnutty
0
111
Member Avatar for ayan2587

int fun(int(*)()); int main() { fun(main); cout<<"in main"<<endl; return 0; } fun(int (*p)()) { cout<<"in fun"<<endl; return 0; } the output is.... in fun in main how and in which manner is "main" being passed in the fun function argument in main function. does this way of passing automatically mean …

Member Avatar for ayan2587
0
125
Member Avatar for rcaldera43

For some reason, I can't even get a simple "Hello World" to print out in terminal. I'm using Borland C++ Builder 6. The Form1 window comes up but nothing is written in it. No errors, just a blank page.

Member Avatar for tomdupuy
0
651
Member Avatar for ayan2587

hi frndz... here's a very small doubt that's been lingering for a while... what is the meaning of finding an algorithm for a certain problem in constant space?? i dont understand the meaning of constant space, does it mean that no temporary variable can be created? for ex:here's a question... …

Member Avatar for chaines51
0
85
Member Avatar for mybluehair

Long story sort, I'm making a thread in c++ that starts a timer. When a user starts playing the game, it starts the thread, and when user logs out - thread stops. - thus giving me the total time played. Problem: When using the code to start the thread - …

Member Avatar for Skeen
0
168
Member Avatar for guest7

Hi, I have two directories and each directory has a *.cpp and *.h and a Makefile. I am also creating an instance of the class of program1(in one directory) in program2(in other directory). I have a main Makefile that makes the two makefiles in each directory. i am getting the …

0
73
Member Avatar for NinjaLink

I am trying to determine if a word is a palindrome or not using queues, but I am receiving the wrong results. I have tried several things to get it to work using the boolean variable isPalin. Will someone lead me to the right direction please? I have been trying …

Member Avatar for JasonHippy
0
120
Member Avatar for ellimist14

I know it's a lot of code but any help anyone can give would be amazing. Basically when I re-write out to the binary file it must not be working because when I try to print it it only prints the record I updated. [code] void updateRecord() { int key; …

Member Avatar for rdrast
0
164
Member Avatar for svgreatest

When i run the program using g++ 4.3, i am getting a segmentation fault. After, checking with gdb, i am getting the segmentation fault on line 79. The program is k-way merging. Any help is welcome. Thanks. The code is: [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; …

Member Avatar for Dave Sinkula
0
97
Member Avatar for .:Pudge:.

I don't know how to properly override this function when it comes to an Iterator for a linked list. [CODE] ListIterator operator++(){ currentPtr->prev=currentPtr; currentPtr=currentPtr->next; currentPtr->next=currentPtr->next->next; return *this; } // advance iterator to the next list node; return value is iterator *after* advancing ListIterator operator--(){ currentPtr->next=currentPtr; currentPtr=currentPtr->prev; currentPtr->prev=currentPtr->prev->prev; return *this; } …

0
55
Member Avatar for RaveFantasy

Hello there~ Well, straight for the problem: I have a class with a private vector that stores pointers: [code]class MyClass{ private: vector<myOtherCls*> myVector; public: //using the following till now: vector<myOtherCls*>& getContainer(); };[/code] [code]class myOtherCls{ public: void someGetFunc(); };[/code] Now I dont want to use [icode]getContainer()[/icode] but rather he Subscript-Operator. [code]MyClass …

Member Avatar for RaveFantasy
0
111
Member Avatar for C++ Beginner

Problem: Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: `void getScore()` should ask the user for a test score, store it in a reference parameter variable, and validate it. This …

Member Avatar for C++ Beginner
0
2K
Member Avatar for skp888

hello, my problem is: i have a function that i pass a pointer to so that it can update a variable for me. when this function is called normally the variable updates and everything works fine. BUT when i call this function *as a seperate thread*, and pass it the …

Member Avatar for skp888
0
262
Member Avatar for newcpp

I have a problem when handling the txt file in C++. My code is like this, and the test.txt file is in the attachment. there are two functions: [LIST=1] [*]int txtnum(ifstream& input, char* filename ) is to count the amount of numbers list in the txt file. [*]long filesize( ifstream& …

Member Avatar for Ancient Dragon
0
139
Member Avatar for Wong23

Can someone help me with this problem... A is an m*n matrix B is an n*p matrix product AB is an m*p then I have to write a function void matrix product that takes two matrices of integers as two separate arguments and then calculates the product of those matrices …

Member Avatar for tintin.iitk
0
112
Member Avatar for sa3q

hello all, my problem that i can't get the language id that has been active in this time using c++ please can any one help me in that thank you

Member Avatar for sa3q
0
46
Member Avatar for Ashishinani1756

help me in listing file names inside directory by using a simple code in c++ that a beginner can understand

Member Avatar for skp888
0
140
Member Avatar for Wong23

can someone help me with this problem(factorial) everything is working fine but when I enter a negative number the program crashes somewhere....but n can be any non-negative number Here is da code #include <iostream> #include <string> using namespace std; int fact(int n){ if (n==0) return 1; else return fact(n-1)*n; } …

Member Avatar for dkalita
0
104
Member Avatar for tkud

Hey,everyone.. pls I need a very exhaustive example of a typical linked list for better understanding .Any help will be appreciated..Thanks

Member Avatar for tkud
0
106
Member Avatar for fraandres

why when I run it ....the output of the "if" statements doesn't come up ...Im trying to see if theres any erros but I just cant find anything please any help I would appreciated [CODE] include <iostream> #include<iomanip> using namespace std; int main() { char size; cout<<"******************Welcome to M&D Pizza …

Member Avatar for alg
0
103
Member Avatar for cproud21

I have the following code that tests a string to see if it is a palindrome. The only error I am getting is when I try to pass each character to the queue and stack. Is there another way to pass it to each? [CODE]//Implement the palindrome-recognition algotithm described in …

Member Avatar for BeyondTheEye
0
122
Member Avatar for jtddogg

I have been looking for something to make it click in my head on how to get the average of my array and I need help. [CODE]#include <iostream> #include <math.h> using namespace std; int grades[10],a,total; double average; void main(){ cout << "Enter 10 test grades to average:" <<endl <<endl; for …

Member Avatar for mrnutty
0
124
Member Avatar for akosmaroy

while syntactically templates cannot be virtual functions, I wonder what approach to use when semantically this is what someone wants to do. for example, in my case I want to have a virtual function, because I'm using sub-classes while having a pointer to the base class, but I also want …

0
85
Member Avatar for arifliminto86

Hi, I got problem with Interprocess communication in MFC I am using vs2003 I have got project using named pipes. It seems to be perfect, However, When client want to create the file it always fails the pseudo code Server - Create Named Pipe - Read File Client - Create …

Member Avatar for jangid
0
201

The End.