19,876 Topics
![]() | |
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; … | |
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? :?: | |
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. … | |
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; … | |
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 … | |
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 … | |
Please help me. Kindly tell me how to open image file in windows from C programming Many Thanks, Shahnaz | |
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; … | |
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? | |
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 … | |
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! | |
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 … | |
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 … | |
[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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … ![]() | |
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 | |
Im using an ansi c compiler all the errors using gcc -ansi -Wall -pedantic should work without warnings and errors. Running on unix | |
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 … | |
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 ( … | |
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 … | |
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> … | |
what are the two issues involved with multiple inheritance? i know of one, the diamond problem, what's the other? | |
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 … | |
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 … | |
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? | |
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 … ![]() | |
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; … | |
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 … | |
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. | |
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 … | |
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 … ![]() | |
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 | |
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 … | |
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 … ![]() | |
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 … | |
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) | |
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(); // … | |
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 … ![]() | |
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) … | |
/* 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 … | |
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. | |
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 … | |
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 … | |
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; … | |
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 … |
The End.