49,761 Topics
| |
Plz answer to my C doubts:- 1) Why do prototypes of some predefined functions in ctype.h(ex- tolower(ch)) has 'int' as the data type for formal arguments? How will it matter if the formal arguments r of type 'char'? 2) Is there any command in DOS for viewing the non printable … | |
1) Plz explain these complex declarations(from K&R).-- [CODE] char(* (*f())[]) () // f : a function returning pointer to array[] of pointer to function returning char. char(* (*x[3])()) [5] // x: array[3] of pointer to function returning pointer to array[3] of char. [/CODE] The one line explanations which r given … | |
Hi All, Currently I am doing one project related to unicode file reading & writing. I got my result using CFile & using WcharToMultibyte,MultiByteToWchar conversion functions. But I have a doubt whether those functions work fine if the unichar is more than 2 bytes. Now I want to read the … | |
I just had a pretty basic question regarding graphics in C++ using the header graphics.h. How would you take a shape or just regular text and randomly move it around the screen like you would see in a screen saver? Just looping it to randomly display it in different areas … | |
Dear all, I have a prog working and printing to screen. But as my program has grown i.e class/method definitions I need to tidy up my main(); my problem is with printing my results to the screen. [COLOR=Red]///this will print out to screen perfectly. note i left out the class/method … | |
Hello, I just have a question about how to find a substring when one has only a string and coordinates for where the data will be? For instance, a string "why,hello", and data that is at the coordinates 4 to 8. strstr, I obviously cannot use directly, because I have … | |
I'll type the assignment I've been given. Then I'll tell you what my problem is, then I'll post my code. I'm sure the answer is probably so freaking stupid and would bite me if it had teeth. :mrgreen: A small airline has just purchased a computer for its new automated … | |
I have a problem i have a fully operational C++ code that works but when i convert it to ASM (assembly) code it doesnt work I dont know where I am going wrong but here are both codes.. [code] #include <iostream> using namespace std; int main() { int n, tmpA, … | |
Ref Polymorphism: I am trying to get the method `calculate_pay()` to work. As each type of doctor will have a differnt payrate I am trying to call the calculate_pay() but i am having difficulty. Should it be int doctor::calculate_pay() { return (doctor::get_Payrate()*hours); } will this line return each type of … | |
plz give me links or discuss on address calculation in 2d arrays. i have little knowledge of calculating the address. can any one give some formula or something coz my professor gave it but i wasnt able to follow . i remember he was using terms like rowmajor, column major, … | |
I am having trouble trying to implement my recursive method for inserting into a linked list. I made the recursive method private because it needs acces to the head pointer. Not sure where to go from here . Any help would be appreciated. Here is the code. The .h file: … | |
[COLOR=Navy][B]Just want to know the latest visual studio available right now. I'm currently using visual studio version 6.0. What I can see from MS website is version 2005 right now. Does that include the .NET thing? Cause I'm kinda curious what this .NET thing is all about..and recently there are … | |
Any help would be appreciated, this project is fustrating me. Has to do with PGM image files, but really the problem in my code (I would assume, lies within my pointers and dynamically allocating memory). Any help would be appreciated. Code: (main.cpp) [CODE]#include <cstdlib> #include <iostream> #include <string> using namespace … | |
dear all, when I try and compile the following code I am recieved a linker error. Can some one steer me in the right direction. Also are my use of the virtual statments correct? many thanks tim #include <iostream> #include <stdlib.h> #include <string.h> using namespace std; class doctor{ protected: string … | |
hi... i really need help writing this program please i cant do it............ the instructions are.... a mail order house sells five diffrent products whose retail prices are shown in the followingtable: product# retail price: 178 $2.98 185 $4.59 199 $9.98 208 $4.19 288 $6.87 there are several permanent customers … | |
Hello folks, First timer here so bear with me. I'm trying to tokenize an array of strings. This program reads an array of strings, each string has a First and Last Name and some have Middle Names. The array of strings is then bubble sorted(not the most efficient but required) … | |
Hey guys and gals. I'm struggling yet again to get my file input working. I have a text file containing: John 19 smith 15 03 1986 Billy 15 Nomate 19 07 1990 ... etc I'm needing to get a line in at a time but also store the variables in … | |
Hi guys, Will you guys please suggest me some good books for TEXT compression with programming examples given in c or c++. Hope you guys will help me. :) prasath. | |
The code below compiles but produces the wrong output. The code is supposed to convert an infix string to postfix. the current output is only the arithmetic operator, unless there are parenthesis then it will only show the right parenthesis. I have been woking on this for hours and am … | |
I am getting these error can someone help? subscript requires array or pointer type -- point to lowest[x] = lowest; subscript requires array or pointer type -- average[x] = average; [code] #include <iostream> #include <iomanip> #include <string> using namespace std; void studentName(string name[4]); void getScores(double grades[4][5]); void findLowest(double grades[4][5], double … | |
[B][COLOR=Navy]This is an ongoing question going through my head.... I've been doing C++ programming for about 4 months now. Been using Deitel's C++ How to program book. Learned from the basics till data structures like link lists, queues, stacks, trees..all using templates, vectors, pointers. File processing (sequential and random). Well, … | |
hi every 1 please i need your help to complete my code cause i could not complete it it is for a bank wich . Design it so it can be used by the bank’s staff. It should enable the following: o Opening a new account for a customer o … | |
I cannot figure out these errors can someone please help [code]error C2065: 'stack' : undeclared identifier error C2228: left of '.isEmptyStack' must have class/struct/union type error C2228: left of '.pop' must have class/struct/union type error C2228: left of '.push' must have class/struct/union type error C2228: left of '.top' must have … | |
hi folks, plz try sending answers to folllowing questions....i know they are a lot..still...send as many as possible..... Write a "Hello World" program in 'C' without using a semicolon. Write a C++ program without using any loop (if, for, while etc) to print numbers from 1 to 100 and 100 … | |
Hi guys, i got this error when i was trying to compile a program "LINK : fatal error LNK1104: cannot open file "jbig.lib" Error executing link.exe." can somebody please explain this error, coz I am a newbie in C/C++ , all advice will be greatly appreciated. rgds, xin yann | |
im pretty much stuck with this problem. [code] / ************************************************************************** // // Airplane.cpp // // Program that displays the seat diagram for an airplane and allows the user // to select a seat. If the seat is available, the program marks it as taken // and displays a new diagram. … | |
how could i display the reverse the values of the array that are random numbers using pointers. So far this is what I have. it displays the array but it does not display the reverse. [code] #include "stdafx.h" #include <iostream> #include <ctime> #include <cstdlib> const size = 10; typedef int* … | |
Hello, I am having a problem with sockets. Not the sockets themselves, exactly, but more of the recieving and accepting of messages and connections (respectively) at the same time. My program runs a loop where it will wait to accept a connection (using accept()), and then wait to recieve a … | |
I am try to write a C++ program that tells the eldest and youngest sibling in a family. I am write this program declaring a class.I write all code program but my program does not compiles and give oprator error. Please someone check this and make it correct.I need this … | |
Hey everyone, I'm writing a program for a class. It's a relatively simple C program that I'm compiling in Dev C++. I'm trying to make it as complex as possible, but I'm just a college freshman and don't know much beyond the basics of programming. I'd like to enable option … |
The End.