473,799 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

telephone pointer program

91 New Member
This isn't a homework,i want to improve my skills in programming and apply my understanding to pinters. i'm developing a program that will print telephone numbers randomly for a city for instance(maybe use a code for (011) and those telephone numbers should be equal to 10 numbers. so may someone please give a clue how to start this beautiful thinking of mine.thanks
Sep 17 '07
10 2464
Savage
1,764 Recognized Expert Top Contributor
i know how to generate numbers i can use function srand(time(0)) to generate those numbers,but now I'm confused about the simple function you suggested to lower the space,may you give me an example of it.and I've already started with the program I'll show you shortly what I've done so far and i apologies for calling you sir
This is what i meant.

Expand|Select|Wrap|Line Numbers
  1. //function declaration
  2. .
  3. .
  4. //function body start
  5. char array[10];
  6.  
  7. for(int i=0;i<10;i++)
  8. {
  9.    //generate a number and store it into array[i],make sure that number is from range 0-9
  10.    //add to array[i] '0' so that it really become a string of digits,and not of invisible  characters(Check ASCII table)
  11. }
  12.  
  13. return array;
  14.  
  15.  
  16. //function body end
  17.  
  18.  
  19.  
Sep 18 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1405
by: Cesare Nicolai C. | last post by:
Hi! Someone knows if using only MIDP1.0 to program an application, these last works on all the cellular ones that support such profile? Moreover the same application can wark on a telephone gprs and umts or can arise problems (for example connected to the band.)? Thanks, Cesar
383
12273
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a poor man's DBMS, a broken email server and various other /application/ servers to try and crack the Internet and IS markets. In the case where they didn't spend their own money to get companies to
110
9969
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object must be an object instead of
4
7540
by: Iftikhar Hussain | last post by:
Hello Everyone Nice to be back here, well all u guys have helped in past & now I would like a favor again. first what i want to develop is as follows: An application for rescue station, where there is a Telephone & a Computer System . the telephone is also connected with the computer system, so when the telphone rings, the Computer can act as a CLI & could identify, which number the call is coming from. it gets that number, matches it...
1
1917
by: Nick Bishop | last post by:
I have a problem where I call a method in a C++ class with a pointer which is a static member in that class. When I use a debugger, I see the pointer having a certain value, but when I step into the method (F11), the pointer has a different value and is not pointing at anything valid. The small program (complete source below) demonstrates what I am trying to achieve. The small program works perfectly, but when I incorporate this logic...
1
5628
by: SteadyEddie | last post by:
I have to write a program to calculate a telephone bill, which converts hours into minutes (done), show the day of the week in full from a single letter input (done) calculate the cost of the call (this is were I am stuck). The first 3 minutes are charged at 1.50 and any minutes after that are charged at 0.30 per min. The calculation that I have tried reads as follows: //This Section Calculates The Cost Of The Call. void CallCost() {...
5
8023
by: yenra | last post by:
Can anyone help me in making this program?!... I need to make a telephone directory using structure definition.. typedef struct AddressTag{ char surname; char givenname; char middleinitial; char telnum; struct PersonTag *next;
1
2252
by: silent15 | last post by:
I am having a bit of trouble writing a function for a telephone directory. I need to create a program that upon prompt of first and last name it needs to output the corresponding number from a dat file or indicates that the name isnt in the file. then after each lookup i need to ask whether to look up another number or exit. this is the code I have so far, I am not very good with functions so... #include <iostream> #include <string>...
0
2867
by: tlontz | last post by:
I am trying to retrieve the telephone_number from active directory using the following script: Dim search As New DirectorySearcher("") search.Filter = "(&(objectCategory=Person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(samaccountname=" + UserName.ToString.Trim + "))" 'search.Filter = "(&(!(userAccountControl:1.2.840.113556.1.4.803:=2))( objectCategory=person)(samaccountname=" +...
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.