WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

hi i m trying but couldnt able to do the progrm.
the program is in c & its on finding a string from a text file.
so please help me out to doing it:sad:

Sure. If you would
1) explain what you've tried
2) show what you've tried (read this)
3) not hijack someone else's thread -- make your own

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

since we are using std::string, why not

#include <iostream>
#include <string>
using namespace std;
int main()
{
  string str ;  cin >> str ; 
  const string vowels = "aeiouAEIOU" ;
  int n_vowels = 0 ;
  for( string::size_type pos = str.find_first_of(vowels) ; pos != string::npos ;
        pos = str.find_first_of(vowels,pos+1) )  ++n_vowels ;
  cout << "vowels: " << n_vowels  << "\nconsonants: " 
          << str.size()-n_vowels    << '\n' ;
  return 0 ;
}

Probably because it's beyond his current knowledge... ;) That's for someone far above his level of experience.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

i have no idea
i hope sombody will help

Two people already have -- Wolfie directly answering your question, SOS explaining something you need to understand. And here's a third:
TTT is played on a 3x3 grid, therefore you should consider using a 3x3 array (matrix), like char grid[3][3]

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

As for part 1, I believe the instructions are referring to c-strings...how much do you know about c-strings?

I don't think so. Although, I don't know what the instructions mean, either.

Can you give us an example of the operation?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

... However, I really do like to be original (as with our entire design) ...

... I decided to switch back to [relative time] after seeing it used on Digg. However, it appears that it is also the exact same time format sported by both Google News and Google Blog Search.

?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I'm sorry, but the smiley with the tongue sticking out just looks evil. (I think it's the eyebrows)

Point was, we can make our own :)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Of course not....

void defaultParam ( int u , int v = 5 , double z = 3.2 )
{
    int a ;
    u = u + static_cast<int>( 2 * v + z ) ;
    a = u + v * z ;
    cout << "a = " << a << endl ;
}

defaultParam(6) ;

What's u, v, and z?

Now what's u + (( 2 * v ) + z ) ? Replace u with this value -- as an integer

Now what's u + (v * z) , also as an integer after calculating.

Are the lack of parentheses in the original equations throwing you? If so, prime reasong to paranthesize everything!

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Me and my shadow

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Don't flame me for this one either! The word games are like the worst thing I have ever seen in an off-topic forum. I can't stand these threads that go on for years and years, and they are ultra-boring. Plus members get super-high post counts from just adding to story or making up a new word. It also makes it difficult to see how much members help in the other forums if they play word games. But again, please don't flame me! I understand completely that there are many members who love this! I will respect that.

I kinda agree. Although I have no problem with the 'games' as it were (I do play), I get tired of seeing the same two people posting 6-7 times back and forth. That doesn't really make it a game for me. Especially when 900+ posts in 2 months is mostly bouncing back and forth for an hour or so (probably -- can't actually tell when they were made :twisted:) adding to these 'game' threads.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I'll maybe look into adding some new smilies. However, I really do like to be original (as with our entire design) and don't want to just find a smiley pack somewhere on the web at the risk of them being copyrighted or mislabeled as public domain, which could compromise our reputation.

So let's design new smileys! How hard can it be?

Sulley's Boo commented: cute icons :D +3
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Your desk-check of the first call (6) is wrong.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Here's a simply way to do it with a while loop.

And how does that poorly formatted program help with

I'm trying to write a program in C using nested loops which ...

:rolleyes:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Sorry couldn't resist this... Is Vista free ? I guess no. Good compilers are not hard to get by, so the only reason for not upgrading would be laziness or some genuine project constraint....

You missed my point completely :p

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

i dunno....

You dunno? Assume all signatures are from France, England, and the Antarctica? Is there any reason then to honor the petition? I don't want other countries telling us what we should do. If we're not loud enough or passionate enough ourselves, we obviously don't really want/need it. ;)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

your altruistic feelings

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

say anything you want, but don't lie

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

between lovers and

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

No Elephant Raids Denmark

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

When a post is made rather recently, the current format does specify three minutes ago versus forty-three minutes ago. But, as I said, I can find no valid example of when it would be important to know down to the minute on a post that one first runs into a week after it's been initially posted.

Of course not. Because you don't care about exact times. There are others here who do. If we want more accurate time, that is a valid example.

But I'm also not talking about a week, I'm talking about HOUR, DAY. I don't mind
DAY resolution after a week,
HOUR resolution after 2-3 days or so,
MINUTE resolution up to 2-3 days or so.

Accurate time was there before and there were few complaints. Actually none that I saw. Now it's changed, and multiple members have indicated they want the time back. (4 strong, 2 mildly). That should give you some indication.

Summary:
No one complained before, then the time was relatively (pun intended) OK.
Now, multiple members voice disapproval. Relative time is not as well liked.
Compromises proposed so we both get what's important to each side.

-30-

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

hi pooja this is jamuna i need ur help

If pooja is having trouble programming, is pooja your best source for help?

have u clear those errors in this program?if so post it and i want to clarify one doubt with u.

Does your instructor want you to use someone else's code for your project, or do your own work?

I have a doubt, too... :rolleyes: (Sorry, just had to...)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

First, format your code properly.

What does your book/instructor say about a FOR loop and/or statement? What's it do? What does it execute?

What does the program you wrote do? What does it not do?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

pliers

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

> Instead of my previous suggestion, then give the registered user the post time.
But I like relative times, remember? :)

OK, fine. Here's yet another attempt at compromise. Give us relative times:
17 Hours, 15 minutes Ago
2 Weeks, 3 Days, 5 hours, 38 Minutes ago.

There, you have your relative times, we get our detail.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

fopen(), fgets(), fclose()

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Clothes held together by staples are prickly.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

lairs

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Where's the beer?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

snakes -- Some, not all, killers eat skin.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Thanks.... I had fun. And if you want to really have some fun, check out http://www.419eater.com/html/letters.htm! The The Tale of The Painted Breast letter is long, but really fun!

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Everyone viewing this thread PLEASE SIGN THE PETITION (Even if you live outside the USA -- We would do it for you if your country was @ risk of losing something so loved)

And get the petition thrown out because of 'petition tampering'? Only US residents should sign it. Outsiders signing it is a baaaaad idea.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Status Update on this matter =

I am really quite settled with the current time format. It's absolutely incredibly useful over the previous form for guests, as I've explained earlier in this thread. And, even for registered members, it's a very friendly and usable format to easily see a post was made 'an hour ago'. And as for posts being made 'a week ago' ... is anything more descriptive even necessary?

As a registered member and a member that is on the board a lot, yes, IMO more description will be useful. A simple addition of the TOD for anything that is a day oriented, and adding date for ambiguous days:
17 Hours Ago (3:15)
1 Week Ago (14:23 24-Mar)

When seeing what to reply to and what not to, does it influence anything in any way whether something was made last Tuesday at 4 pm or last Tuesday at 8 pm? I don't think anything more specific is relevant, which adds to the whole simplicity of it all.

I disagree. I actually want to know if a post was made yesterday at 1AM or yesterday at 11PM. Yes, it's important.

I think one of the most important things in web usability is to know when something is worth adding because it adds value, and when to leave something out for simplicy's sake.

I am also seeing a lot of other popular sites on the 'net taking to the same philosophy. Digg, for example, sports the …

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I'm trying to code the game of Simon(try to mimic the computers choice of four buttons) for a project. I'm kind of stuck because the computer generates a random choice, but I need to completely halt and wait for the user to enter his choice.(Done with the aswd keys; either up, down, left, or right) How can I do this? I'm trying to use _kbhit but it's not working as intended.

Any help would be greatly appreciated.

Based strictly on this description, just read a line from the user. When he hits ENTER check the characters.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Where was values defined as an array?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Interesting. Google search turns up for "Miss Anne Marie Bayo"

I am the only Daughter of my late parents Mr.and Mrs.Bayo .A, George. My father was a highly reputable busnness magnet who operated in the capital of Ivory coast during his days.

I am Miss Anne Marie Bayo the only daughter of Deceased Mr. and Mrs.NELSON ANDRE. My father was a very wealthy gold merchant in Abidjan , the economic capital of Ivory coast,my father is from kwazulu-natal while mum is from a city called Krasnogorsk in Russain, so I am mixed. my father was involved in a ghastly motor accident and later died in the little way
hospital here.

I am 19 years old. I am from Dablama in eastern province of Sierra Leone. I lived with my mother in Freetown before the civil war started. An explosion in our school made me lose my hearing during the civil war. My mother told me that my father left us when I was two years old. I became an orphan last year when my mother died after illness from liver infection.

Apparently My late father, had provided for us afterall! My father Leon Basile Bayo was in the neighbouring country doing very well in ivory and pine apple trade.

Looks like she's having a really rough life. So are her parents -- all six of them.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I found the following PM today and wanted to share it with you all, it is a scam. Has anyone else received this message?

Ah, yes, the Nigerian Scam... I gotta have some fun with this one....

From Miss Anne Marie Bayo.
13 Hours Ago
From Miss Anne Marie Bayo.
Abidjan. Cote D'Ivoire
Email: (annemariebayo1@yahoo.fr)
West Africa

Yahoo from France, you in WAfrica? Interesting -- it really is a global world...

Dearest One,

Yes, beautiful?

I am the only Daughter of my late parents Mr.and Mrs.Bayo .A, George. My father was a highly reputable busnness magnet who operated in the capital of Ivory coast during his days.

Was he a bar magnet or an electro-magnet?

It is sad to say that he passed away mysteriously in France during one of his business trips abroad on the 12th September 2003.

Sounds like foul play. What did the autopsy show?

Though his sudden death was linked or rather suspected to have been masterminded by an uncle of his who travelled with him at that time.

And...? A dangling sentence.

But God knows the truth!

Good, ask Him. He knows more than me!

My mother died when I was just 6yrs old, and since then my father took me so special.

So you were rather ordinary up until 6, eh? If that's what it takes to make you special, you have other problems.

Before his death on September 2003, …

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Are we talking about doing something that back in 1995 the computer industry left behind? Are you running DOS or a command line from XP?

And is this homework from a school teaching obsolete practices or from your Dad's (or Granddad's?) old textbook?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

What's with that column structure?

A combination of real code and psuedo code to play a location:

int board[7][7];

clear board -- set all locations to 0.  SPACE can be used.

accept location to move: row,col  // must be 0-6, check for error
if (board[row][col] != 0)
{
    display "location already played";
}
else
{
    board[row][col] = player;    // player is 1 or 2 for example.
}
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Finally, someone actually got the output. Good job. I still think printf() is much easier to follow, though.

I like the fact that you put each value in it's own cout statement. That does help.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

By reading the header of the picture file. Loot at http://www.wotsit.org/

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

And why asking here (VB 4/5/6 forum)

The forum was created before VB8 was made. This is the correct place.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

You know, I just went through this entire thread and saw absolutely no code by Jerry. How can we help if you won't even try anything suggested, and/or won't post what you've tried?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

See:
this, this, and this


And nothing is urgent on this board... ;)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Hello,

I wanna know if there is any way to make a window transparent using Win32 API


Thanks in advance,


Jan

I see lots of possible answers putting the important parts of your question in google...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Yes you can do the same in c++ so use cout in c++. Period.

Wanna bet?

Ongoing challenge no one has solved yet:

Convert this printf() statement into readable C++, output must match exactly:

int iVal = 2;
int hVal= 0x0C;
char *filename = "test.fil";
char *username = "juser";
float fValue = 23.8;
printf("%4d  0x%02X  Testfile: [%10s]  user: [%-10s]\nTrial %8.2f \n", 
        iVal, hVal, filename, username, fValue);

Output

2  0x0C  Testfile: [  test.fil]  user: [juser     ]
Trial    23.80
John A commented: Heh. --joeprogrammer +8
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Please format your code so we can read it easier. It's something you need to do if this programming game is important to you.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Which is exactly why the instructors use it: because they can. :rolleyes:

What's wrong with VC6 then?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Why?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Well I am using VC 6.0 because it was given to me to learn c++.

And it's fine for learning C++. It follows enough of the standard that you won't have to worry about it. Compilers aren't like stereo systems where you have to have the latest and greatest every year. VC6 is still in extensive use.

It still bugs me when people keep suggesting someone upgrade just because a new version comes out. That's not always recommended. For example, have you guys upgraded to Vista? XP is so old... :twisted:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I'm sure he's been waiting around for 4 months just hoping you'll give him a solution. :rolleyes:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Try just using <iomanip>. I'm guessing that you have VC6.0 or something at school, which uses old (deprecated) headers.

It uses the new headers, too.