|
3. Write a program which outputs frequency of digits in a given integer. For example, if the number is 12424329, output will be
Number Frequency
1 (space) 1
2 (space) 3
3 (space) 1
4 (space) 2
9 (space) 1
Use a switch statement to obtain frequency of the digits.
This means nothing (space) i just put in so the numbers would line up
|
|
|
|
|
Big Timer? Big timers dont need help with their home work. Big timers dont cross post to multiple forums. Big timers dont post things to unrelated forums. More than anything, big timers dont call themselves big timers
How much are you willing to pay to have your homework done for you?
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
well its due tomorrow and i don't know how to do it so...
|
|
|
|
|
bigtimer1022 wrote: well its due tomorrow and i don't know how to do it so...
...so why did you leave it till now?
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
By the time I saw this, you had failed your assignment. One would hope that you learned from this to do your own work, instead of drinking and posting the question online at the last minute. If you do try to do your own homework in future, you'll find we'd love to help if you get stuck. Just not when you post a (trivial) question and show no sign of having made any attempt to solve it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all,
I have a form that contains one button and one textbox, the textbox will take a number that will be passed to another form. I have done this successfully.
The thing is that I need the second form to create a number of pictureboxes = the number received from the first form.
Any ideas?
|
|
|
|
|
call:
gcnew PictureBox()
for each. Then set the Image and other properties as desired.
|
|
|
|
|
Hi kilroytrout,
I have done this in the Form_load as follows:
<br />
pictureBoxX = gcnew System::Windows::Forms::PictureBox();<br />
pictureBoxX->Location = System::Drawing::Point(24, 262);<br />
pictureBoxX->Name = L"pictureBoxX";<br />
pictureBoxX->Size = System::Drawing::Size(45, 49);<br />
pictureBoxX->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;<br />
pictureBoxX->Image = Drawing::Image::FromFile("avg.jpg");
but nothing appears in the form
|
|
|
|
|
Did you add each PictureBox to the form's control collection?
form->Controls->Add(pictureBoxX);
|
|
|
|
|
Hi kilroytrout,
you helped alot
thanks,
|
|
|
|
|
Excuse me, if anybody has source code and document about Image Digitalizing then take them to me, please
|
|
|
|
|
You want source code in C++/CI ? What do you mean by digitalizing ? I have an article on this site for capturing images from a Canon camera, and a series on image processing. They are in C#, but you can obviously call those from C++/CLI ( but not from C++ )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I need to get the MicroSoft Cluster Solutions Internal IP and External IP.
are there any APIs provided by Microsoft to get the Cluster IP ??
|
|
|
|
|
If it is not related to managed C++, why dont you ask this question in VC++[^] forum ?
|
|
|
|
|
Thanks,
I will do that....
|
|
|
|
|
Hi,
I am trying to get the Cluster version and vendor id installed in the current machine.
I am using GetClusterInformation API for this...but i am getting "unhandled exception " problem for this..Please help me this.
Thanks in advacnce.
part of the code:
const int BufferLength=55345;
char Namme[BufferLength];
DWORD length = BufferLength;
LPCLUSTERVERSIONINFO lpClusterInfo;
lpClusterInfo->dwVersionInfoSize=sizeof(CLUSTERVERSIONINFO);
DWORD retVal = GetClusterInformation(cluster, name, &length, lpClusterInfo);
if i am using only GetClusterInformation(cluster, name, &length, NULL); this gives me the name of the cluster correctly.
|
|
|
|
|
programvinod wrote: LPCLUSTERVERSIONINFO lpClusterInfo;
lpClusterInfo->dwVersionInfoSize=sizeof(CLUSTERVERSIONINFO);
You are using uninitialized pointer.
You need to modify to ,
CLUSTERVERSIONINFO ClusterInfo;
ClusterInfo.dwVersionInfoSize=sizeof(CLUSTERVERSIONINFO);
DWORD retVal = GetClusterInformation(cluster, name, &length, &ClusterInfo);
p.s. Please read forum guidelines, such questions should be asked in VC++ forum.
|
|
|
|
|
I have initilized it....as
LPCLUSTERVERSIONINFO lpClusterInfo;
lpClusterInfo->dwVersionInfoSize=sizeof(CLUSTERVERSIONINFO);
|
|
|
|
|
Come on !
Pointer needs to point some thing valid. Here , you have just declared it, and not initialized with any CLUSTERVERSIONINFO address.
|
|
|
|
|
Awesome !!!
It works !!! Thanks a loooot!!!
Can you please please reply to another thread that i have started.
Do you know any API to get the Cluster Internal and exteranal IP ???
|
|
|
|
|
I want to Show the hour of execution of a process i try for:
System:iagnostics:rocess^ p1<br />
ListViewItem^ item1 = gcnew ListViewItem(p1->StartTime.ToString());<br />
listView1->Items->Add(item1);
But they are error on execution:
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
Additional information: Accès refusé
But this is work, it get using of memory:
item1->SubItems->Add(p1->WorkingSet.ToString());
listView1->Items->Add(item1);
Help me, to get solution for this problem;
Thank you
|
|
|
|
|
You don't have access to obtain information on every process on your system. If you run the following code, you may get an access violation:
array< Process^ >^ processes = Process::GetProcesses();
for each (Process^ process in processes)
{
Console::WriteLine(L"{0}: Started {1}",
process->ProcessName ,process->StartTime);
}
Read the following:
http://www.codeproject.com/dotnet/UB_CAS_NET.asp[^]
-- modified at 13:06 Monday 12th March, 2007
-- modified at 13:49 Monday 12th March, 2007
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi,
I'm a bit new to this TCHAR stuff, so I'm confused as to how to do what I need to do.
I created a struct
struct gaugeSound
{
int buffer;
TCHAR* filename;
// char* filename;
bool loop;
bool isLoaded;
};
That I originally stored a filename in as a char*, but later changed to TCHAR* to try to deal with this issue. This has not worked.
With the above struct, I do this:
gaugeSound sound_EngOut = { 0, L"sound\\B206B-III\\Loop_EngOut.wav", true, false };
(here I added the 'L', but originally I just used a char*)
Then I try to do this:
LoadWaveFile(sound_EngOut.buffer, sound_EngOut.filename);
sound_EngOut.isLoaded = true;
however the LoadWaveFile() function was defined like this:
extern "C" VOID LoadWaveFile( WORD BufferN, TCHAR* strFileName )
{
// Create the sound buffer object from the wave file data
if( FAILED( CreateStaticBuffer( BufferN, strFileName ) ) )
{
return;
}
else // The sound buffer was successfully created
{
// Fill the buffer with wav data
FillBuffer(BufferN);
}
}
so originally I changed it to this:
//extern "C" VOID LoadWaveFile( WORD , const char* );
but since that didn't work I am trying to go with the original again.
Yet... there is a problem.... as in this function...
HRESULT CreateStaticBuffer( WORD BufferN, TCHAR* strFileName )
{
HRESULT hr;
// Free any previous globals
SAFE_DELETE( g_pWaveSoundRead [BufferN]);
SAFE_RELEASE( g_pDSBuffer [BufferN]);
// Create a new wave file class
g_pWaveSoundRead[BufferN]= new CWaveSoundRead();
// Load the wave file
if( FAILED( g_pWaveSoundRead[BufferN]->Open( strFileName ) ) )
<snip...>
the Open() call above requires (in WaveRead.cpp) a CHAR* !!!!!!
So, it seems that I have no clue how to use this DirectSound code that has been programmed with TCHAR*, especially since when I use the 'L', the above function can then not be called.
Help! What the heck am I supposed to begin doing?
|
|
|
|
|
It's up to you, as always to use the proper data types in C++.
The type TCHAR's actual type will vary depending on if you've defined _UNICODE, _MBCS, or neither.
If you choose to use the generic text mappings, and you use an API that requires a different type
char, then you'll need to convert strings to the appropriate type before passing them, or use
the appropriate type string literals.
Here's a link to the docs: Using Generic-Text Mappings[^]
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Thanks for the links.
Turns out the problem was that I had UNICODE defined and didnt' know it.
|
|
|
|