49,761 Topics

Member Avatar for
Member Avatar for akshayabc

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 …

Member Avatar for Ancient Dragon
0
310
Member Avatar for akshayabc

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 …

Member Avatar for Narue
0
299
Member Avatar for smaity

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 …

Member Avatar for Ancient Dragon
0
824
Member Avatar for Savage221

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 …

Member Avatar for Geek-Master
0
202
Member Avatar for TimC

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 …

Member Avatar for WolfPack
0
156
Member Avatar for ilikerps

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 …

Member Avatar for Ancient Dragon
0
133
Member Avatar for ban26ana

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 …

Member Avatar for ban26ana
0
262
Member Avatar for heavyc

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

Member Avatar for heavyc
0
186
Member Avatar for TimC

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 …

Member Avatar for TimC
0
170
Member Avatar for sahil_logic

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

Member Avatar for Ancient Dragon
0
167
Member Avatar for skeet123

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

0
37
Member Avatar for j1979c

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

Member Avatar for Ancient Dragon
0
121
Member Avatar for Platanum

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 …

Member Avatar for Ancient Dragon
0
163
Member Avatar for TimC

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 …

Member Avatar for WolfPack
0
98
Member Avatar for coolgal

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 …

Member Avatar for coolgal
0
219
Member Avatar for Halcyon

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

Member Avatar for Halcyon
0
154
Member Avatar for Acidburn

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 …

Member Avatar for Acidburn
0
141
Member Avatar for prasath

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.

Member Avatar for perniciosus
0
144
Member Avatar for btech

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 …

Member Avatar for perniciosus
0
129
Member Avatar for StealthCobra

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 …

Member Avatar for StealthCobra
0
115
Member Avatar for j1979c

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

Member Avatar for jwenting
0
201
Member Avatar for some one

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 …

Member Avatar for some one
0
173
Member Avatar for btech

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 …

Member Avatar for iamthwee
0
231
Member Avatar for akki_freak

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 …

Member Avatar for Rashakil Fol
0
351
Member Avatar for tristan17

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

Member Avatar for Ancient Dragon
0
78
Member Avatar for fidelljf

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

Member Avatar for WolfPack
0
72
Member Avatar for fidelljf

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

Member Avatar for fidelljf
0
101
Member Avatar for ilikerps

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 …

Member Avatar for ilikerps
0
128
Member Avatar for iqbal

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 …

Member Avatar for dwks
0
167
Member Avatar for Operator

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 …

Member Avatar for Dave Sinkula
0
148

The End.