473,394 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Couple of questions about strings and such

52
Okay, first.... is it possible to have an array that's too large? I seem to be getting an error when i try declaring a two dimentional array that's... well... huge... so i'm guessing that it is if your answer is yes...

if it isn't possible to make it an array I'm not sure how i could do this... I'm basically trying to import a dictionary to check words. I have to check the words using a binary search so I don't think a link list would be a good choice. the other option is to compare it to each line in the file, but the problem i'm having with that is getting to specific lines in the file so any hints on that would be appreciated too...




bottom line... i need help again :\
Jun 6 '08 #1
3 1290
gpraghuram
1,275 Expert 1GB
You can delare a double pointer like char**ptr and allocate memory for it in run-time.

Raghuram
Jun 6 '08 #2
Shisou
52
so if I did char** List then i could malloc the memory to make it like a 2-d array?

I think that would be a great idea but it brings me to a new question...

How would I allocate the memory for each of the pointers? Can you please give me a snip of code for that?
Jun 6 '08 #3
Shisou
52
so if I did char** List then i could malloc the memory to make it like a 2-d array?

I think that would be a great idea but it brings me to a new question...

How would I allocate the memory for each of the pointers? Can you please give me a snip of code for that?
nevermind :) i figured it out, thank you verrrrry much using the double pointer works beautifully!
Jun 6 '08 #4

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

Similar topics

2
by: bjs | last post by:
I hope I've got the right group here and apologies if I haven't. I'm a hobby programmer and have just upgraded to Visual Basic.net and have a couple of questions if anybody can help. In VB 6...
9
by: dasacc | last post by:
(1) How do I perform a search for "word" and have it return every line that this instance is found? (2) How do I perform a search for "word" and "wordtwo" at the same time to return every line...
10
by: Ian Todd | last post by:
Hi, I am trying to read in a list of data from a file. Each line has a string in its first column. This is what i want to read. I could start by saying char to read in 1000 lines to the array( i...
7
by: Rano | last post by:
/* Hello, I've got some troubles with a stupid program... In fact, I just start with the C language and sometime I don't understand how I really have to use malloc. I've readden the FAQ...
81
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there...
23
by: Rick | last post by:
Hi, I'm currently preparing for an interview on VB.Net Development.. could someone please give me an idea as to what type of questions can one ask (it's a practical test) and what sort of things...
3
by: punt | last post by:
I've got a couple of questions about a deployed VB.NET application. Firstly can a deployed application remember any variables(single string) after being closed down and re-opened, without the use...
3
by: James | last post by:
What's the difference between += and &= with reference to strings? Also, what are string literals? Thanks. And what are fixed lenth strings? and how do you declare them? Thanks
23
by: TefJlives | last post by:
Hi all, I'm learning a bit about C, and I have a few questions. I'm not trying to insult C or anything with these questions, they're just honestly things I don't get. It seems like pointers...
95
by: hstagni | last post by:
Where can I find a library to created text-based windows applications? Im looking for a library that can make windows and buttons inside console.. Many old apps were make like this, i guess ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.