19,876 Topics

Member Avatar for
Member Avatar for DashM

Hi, i'm trying to write a function that enlarges a given two dimensional array horizontaly and Verticaly by different numbers. So far i have got this code. Bu it doesnt really work at the moment. Please help. Code: void BitMap::enlarge(int horiz, int vert) { bool temp[MaxSize][MaxSize]; temp[0][0]=true; int m, k; …

Member Avatar for AstroNox
0
100
Member Avatar for anands

wat r all the programming languages used in mobile phone technologies?how they r used ?wat r all recent advancements in programming technologies in mobile phones? :?:

Member Avatar for Lord Soth
0
191
Member Avatar for debugger

I am trying to delete the first node in the singly link list but cant seem to do so? My Code is below... Could someone please suggest something. thanks. This program has an enqueue function which works. `*p` is a pointer to a node which has been allocated using malloc. …

Member Avatar for debugger
0
85
Member Avatar for vicky_dev

Hi all, what exactly is segmentation fault or access violation and exactly when does it occur? Why does the following program work correctly : [code] #include <stdio.h> #include <conio.h> int main( ) { int a[5]; a[20] = 20; a[-20] = 30; printf("%d %d", a[20], a[-20] ); getch( ); return 0; …

Member Avatar for Salem
0
74
Member Avatar for degamer106

Yesterday, I posted a similar problem (involving numbers) which was solved by Clinton Portis (Thanks by the way) which involved several if statements. This time I got one with a string :rolleyes: If there's some kind of space saving technique please let me know :mrgreen: [CODE]#include <stdio.h> #define SIZE 5 …

Member Avatar for degamer106
0
91
Member Avatar for jack223

The class Chevrolet inherits from the class Automobile. Both have implemented a function called DownShift(). Suppose carPtr is declared as: Automobile *carPtr; The carPtr object can point to both a Chevrolet or an Automobile. We want the call carPtr -> DownShift() to call the right version of DownShift based on …

Member Avatar for Narue
0
95
Member Avatar for shahnazurs

Please help me. Kindly tell me how to open image file in windows from C programming Many Thanks, Shahnaz

Member Avatar for shahnazurs
0
118
Member Avatar for degamer106

OK I wrote this dice program up and it works really well. Just curious though if there was a way to reduce the number of "if" statements. [CODE]#include <stdio.h> #include <stdlib.h> #include <time.h> #define SIZE 11 #define TOTAL 36000 int main(void) { int cnt = 0; int die1, die2, sum; …

Member Avatar for degamer106
0
116
Member Avatar for acezrwild817

C:\Documents and Settings\Andy M. Moore\My Documents\Visual Studio Projects\caller\trunk\OfflineRegistry\OfflineRegistry.cs(203,15): warning CS1591: Missing XML comment for publicly visible type or member 'SecondSec.SERC.Common.ContainerObjectModel.RegKeyContainer' What does this mean?

Member Avatar for SergioGP
0
158
Member Avatar for degamer106

Here's a simple program I wrote. [CODE]/* Use a single-subscripted array to solve the following problem. A company pays its salespeople on a comission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who grosses $3000 in sales …

Member Avatar for degamer106
0
151
Member Avatar for Yustme

Hi, Im trying to make a function that flip bits. There is not much usefull to find on the net about this. Like an example of such function. Does anyone have a function that flipbits? Thnx in advance!

Member Avatar for Narue
0
2K
Member Avatar for degamer106

Ok..this problem is kind of confusing because I have to use these 2 functions getc() and ungetc(). What i'm supposed to do is take in input in the form of a string, find all digits, store the digits in the string, convert the string into a digit, and finally print …

Member Avatar for Narue
0
463
Member Avatar for perlsu

I would like to know whether the dynamic memory pointer is still available even after freeing the allocated memory. If I want to allocate and deallocate so many times within a loop , I receive memory corruption. Pls help me how I should do.If I call "free" more than one …

Member Avatar for Narue
0
99
Member Avatar for jack223

[Code] Class B { public: int e(); void f(); private: int x; }; class D: public B { public: void h(); void g(); private: float y; } [/code] How many public methods does class D have? is it 2 or 4? void h(), void g() and i'm not sure about …

Member Avatar for Lerner
0
96
Member Avatar for degamer106

OK..so here's the problem... I'm supposed to create a program that reads a text file containing 5 lines, each composed of a name, a colon, and three integers. For example: Bill Gates: 10 20 30 Shalla Booger: 80 70 84 Hagar Joe Plinty: 70 90 80 Darth Vader: 60 50 …

Member Avatar for Narue
0
142
Member Avatar for neo69potato

ok basically me and a friend are learning C language and we're totally stuck on this problem in the textbook and want to get around it before moving on. We're totally useless so a nudge in the right direction or any help at all would be awesome. heres the problem: …

Member Avatar for neo69potato
0
346
Member Avatar for Duke_0064

Does anyone have any suggestions as to how I could better this code.(Not too fancy). I'm supposed to use a switch statement. I think the concept isn't bad. But some things are off as far as my opitions displaying correcly. [INLINECODE]#include <iostream> using namespace std; int main () { char …

Member Avatar for Ancient Dragon
0
148
Member Avatar for musicmancanora4

Hey guys im making a calendar program where you enter a month 0 to display all months for that year... 0 - 12.. 1 being janauary etc and then entering the year. Similar to the cal command in unix sun on tue wed thu fri sat 1 2 3 4 …

0
91
Member Avatar for Eng_Girl

Hi, I'm new to this fourm I want to ask if anyone can help.I have a program for a GPS receiver it is in C ,for testing I assume the string of GPS message, it doesn't have any errors but it didn't run I don't know why. I used the …

Member Avatar for iamthwee
0
125
Member Avatar for srishekh

could u tell me the problems in defining a 3D double array. that is double a[1000][1000][1000]; While running the program, it gives segmentation fault errror. Please tell me , wat should be the limit of the array or how to come arround this. Thanks and Regards srishekh

Member Avatar for andor
0
64
Member Avatar for musicmancanora4

Im using an ansi c compiler all the errors using gcc -ansi -Wall -pedantic should work without warnings and errors. Running on unix

Member Avatar for Ancient Dragon
0
90
Member Avatar for musicmancanora4

Hey guys sorry for posting the whole code again.. How i can get my calenda program working from here? Because its not printing anything its only printing the mon tu wed etc but not the days of the month 1 - 31 and im not sure if its worked out …

Member Avatar for Ancient Dragon
0
97
Member Avatar for Duke_0064

Hello, I have this program here>> it's a random guessing number game. It works great the only thing I can't figure out, is how to display the [B]best score[/B] at the end of the Loops. The outer loop is suppose to keep track of the number of games played ( …

Member Avatar for dubeyprateek
0
150
Member Avatar for niteshq

Hello, Everybody. Myself is Nitesh. I have joined this group earlier. Please provide me ebook of C language. Thanking You, Nitesh

Member Avatar for iamthwee
0
34
Member Avatar for dors_zone

here are the question: write a program that inputs a series of integers and passes them one at a time to funtion even, which uses the modules operator to determine whether an integer is even. The function should take an integer argument and return true if the ineteger is even …

Member Avatar for dors_zone
0
105
Member Avatar for gampalu

Hi all! I´m having a problem, I'm reading from a txt file values (doubles) but my cout outputs the following: -9.25596e+061 -9.25596e+061 -9.25596e+061 -9.25596e+061 Press any key to continue When it should read this: 1.986772 2.607455 0.000000 0.000000 The code is: [CODE] #include "stdafx.h" #include <stdlib.h> #include <stdio.h> #include <time.h> …

Member Avatar for gampalu
0
142
Member Avatar for nemo

what are the two issues involved with multiple inheritance? i know of one, the diamond problem, what's the other?

Member Avatar for Narue
0
65
Member Avatar for Duke_0064

Hello, I have this for loop here, and everything is great except I can't figure out how to display 3 numbers per line instead of all number on one line. Can anyone help? Thanx! #include <iostream> using namespace std; [INLINECODE]int main( ) { int x; cout << "Numbers between 5 …

Member Avatar for Duke_0064
0
85
Member Avatar for Duke_0064

Hi, I'm new to this C++ stuff. So if anyone can help that would be nice. I have this program to generate a random number and a the user inputs a number from the keyboard to correctly guess the number that the computer randomly chooses. but the numbers are always …

Member Avatar for Duke_0064
0
107
Member Avatar for musicmancanora4

Hey guys i need to find out how many days there are in a particular month in a particular year. How can i start building an algorithm like that im having some trouble?

Member Avatar for Bench
0
89
Member Avatar for iamboredguy

we have a project in our class to design a sliding numbers game similar to this one: [URL=http://www.eatmygames.com/gameinfo.asp?id=24puzzle]http://www.eatmygames.com/gameinfo.asp?id=24puzzle[/URL] the only difference is that the number of blank spaces is user input (max=n/2 where n: no of elements in a row/column). we have to design an algorithm to make the computer …

Member Avatar for iamthwee
0
180
Member Avatar for musicmancanora4

Sorry guys i apologize for posting large code but im trying to pass the int daysOfMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31} variable array to the totalDays function so i can do some calculations. But i keep getting a seg fault. [code] int main(void) { unsigned month; unsigned year; unsigned long days = 0; …

Member Avatar for Salem
0
161
Member Avatar for nabil1983

Ok i finished off the program i was making. now i just got a couple problems icant work out....spent hours doing this please help me with my last few probs... First thing is when i write the records to file, and then when i try to sort it...the display shows …

Member Avatar for dwks
0
228
Member Avatar for d_gabs123

Hi there, I really need your help. Who knows or who has a code for Hangman game in "C" Language. Please I badly need your help. Thanks.

Member Avatar for Salem
0
58
Member Avatar for musicmancanora4

Hi guys im having a slight problem passing the month and year variable to a function that i have created called int totalDays(unsigned year, unsigned month) now when i do a print inside the function it prints 0. Even though i have inputted using a key for example 6 for …

Member Avatar for andor
0
105
Member Avatar for vurdlak

I started wrting c lessons for absoulute begginers to advanced users, I think material can be considered quality, and my students learn programming with this stuff. If you wish feel free to start reading it.Its only 8 lessons for now so maybe could be easier for you to start following …

Member Avatar for iamthwee
0
141
Member Avatar for some one

hi every 1 i wanna to ask about sigl and double linked list *what is the advanyages and desadvantegs of the double linke list *when we use the double and when we use the single thanks

Member Avatar for some one
0
88
Member Avatar for nthompkins

Hello will someone please help!! Here is the assignment • Using a function with the header below, pass it arguments in main, alter ary1 contents and display ary2 contents in the function definition. Display the contents of ary1 in main after the function is called. void arrayTst(int ary1[], const int …

Member Avatar for nthompkins
0
186
Member Avatar for chelo77

I have problems in how can i use the backspace key work in deleting characters in real time. I have a program where you can type a string no more than 60characters but say i don't want the last character and want to delete it, if i hit backspace it …

Member Avatar for iamthwee
0
211
Member Avatar for Vagabond

Greetings I've been faced with this problem may be you could help? [CODE] [B]class[/B] CalculatorObject : [B]public[/B] TDialog { [B]public:[/B] StateType CurrentMode; [B]char[/B] Operator; [B]char[/B] DisplayBuffer[DisplayPlusSign]; [B]BOOL[/B] Negative; [B]BOOL[/B] InputIsADigit([B]char[/B]* input); [B]double[/B] Operand; TBrush CalcBackground; .....[/CODE] I need to change char DisplayBuffer into a character pointer instead of a character …

Member Avatar for Ancient Dragon
0
135
Member Avatar for k.moorthy

pl help me to writea program that takes a decimal number and coverts it to both octal and hexadecimal equivalents with two function detooct and dectohex. The out put willbe as under enter a number 456 Num 456,octal710(710)hex1c8(1c8)

Member Avatar for anupam_smart
0
163
Member Avatar for djbsabkcb

Below is my source code for a tictactoe program. However, my output after first move always states invalid choice, no matter what number I enter? [code] #include <iostream> #include <string> #include <cmath> using namespace std; class TicTacToe { public: TicTacToe(); // constructor int Pick_Player(); // member function int Pick_Row(); // …

Member Avatar for Narue
0
809
Member Avatar for Scoobs

I need to write a program that will produce a hollow box of stars. the program has to ask the user how many rows/columns, then use a while loop, if statements, etc. to execute it. I was able to get a box of stars but not a hollow box. Any …

Member Avatar for iamthwee
0
74
Member Avatar for minorityreport

Hi, Can anyone tell me if i have done these functions correctly; i maybe missing something; maybe thats why im getting segmentation fault!!! #include "listFuns.h" #include <stdlib.h> #include <stdio.h> listADT stringToList(char str[]) /* desc: converts a C string (array of char) into the */ /* corresponding word (list of characters) …

Member Avatar for Narue
0
300
Member Avatar for bofarull

/* compiler used: */ /* simple application to generate basic arithmetic operations */ /* March/3rd/2006, John Bofarull */ #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<time.h> #define RAND__MAX 4294967295 #define OPS 40 /* how many operations per file */ /* poke about these 8 constants to harden or soften tests */ #define SDL 4 …

Member Avatar for bofarull
0
298
Member Avatar for shlinky

Hello. I am looking for a c library that emulates the double data type (64bit) with integers (32bit). it should have basic arithmetic functions like add, sub, mul and div. already searched the web, but no luck so far. hope you can help me, thanks.

Member Avatar for shlinky
0
155
Member Avatar for minorityreport

Hello, i am developing a software for wordCount; i have done all the functions neccessary; I get segmentation fault when i try and run this : int main() { char* str = (char*)malloc(100); str[0] = 'T'; str[1] = 'e'; str[2] = 's'; str[3] = 't'; str[4] = 0; itemType item …

Member Avatar for Narue
0
86
Member Avatar for chelo77

I use cin.get to pause the screen so i can display my data on the screen, cin.get() pauses it good on the first try. Basically if you hit "enter to continue" the loop works great with no jumping over the cin.get(). However, if you hit any other keys on the …

Member Avatar for Narue
0
232
Member Avatar for WolfPack

Can anybody please tell me what is wrong with this piece of code? [code] std::string query; std::cout << "Enter the Query String :";// Type something with spaces here. e.g ( "financial instruments being traded on the American stock exchange" ); while (std::cin >> query ) { std::cout << query <<std::endl; …

Member Avatar for WolfPack
0
366
Member Avatar for shakoush2001

Hi I want to make my form transparent, now that is easy..but there is one region in the form "a tpanel" which I do not want to be affected by the transparency. In other words I want it to stay fully visible no matter what the alphablendvalue of the TForm …

0
73

The End.