|
tayyyar wrote: some people say give me spesific ı think this message a little bit specific .
You thought wrong. When you take you car to the shop to have it serviced, do you just hand the keys to the mechanic and say, "It won't run" and expect him to know where to start looking?
tayyyar wrote: ı have got an appointment my lecturer next week for this program .
So why has he not been consulted earlier?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
 I've gone through and formatted your code for easier reading for the sake of everyone else's sanity. Please make proper use of tabs and whitespace. Whitespace is ESPECIALLY needed between operators and after comma's (,) I've also added some comments where I think you've made simple mistakes that probably don't affect the problem you're having but are otherwise problems waiting to happen. Most of the changes are however cosmetic in nature.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#define size 9 //Don't use #define for your constants. Instead use the const keyword and the desired type of the object you are creating.
#define size2 81
int checkingSquare(int *i, int *j, int *row, int *column, int **a);
int main()
{
int i, j, row, column, controller = 0;
int **a = 0;
srand(time(NULL));
for(i = 1; i < 10; i++)
{
for(j = 1; j < 10; j++)
{
while(controller == 0)
{
printf("access1");
controller = checkingSquare(&i, &j, &row, &column, a);
}
}
}
for(i=1;i<10;i++)
{
for(j=1;j<10;j++)
{
printf("%d\n",a[i][j]);
}
}
return 0;
}
void square(int *inte, int *inte2, int *row, int *column)
{
*row = *inte / 3;
if(*row != 1)
{
*row++;
}
*column=*inte2 / 3;
if(*column != 1)
{
*column++;
}
}
int checkingSquare(int *i, int *j, int *row, int *column, int **f)
{
int x, y;
*(*(f + *i) + *j) = rand() % 9 + 1;
printf("access");
square(i, j, row, column);
for(x = (*row * 3 - 2); x < (*row * 3 + 1); x++)
{
for(y = *column * 3 - 2; y < *column * 3 + 1; y++)
{
if(f[x][y] == f[*i][*j])
{
return 0;
}
}
}
for(x = 1; x < 10; x++)
{
if(f[x][*j] == f[*i][*j])
{
return 0;
}
}
for(y = 1; y < 10; y++)
{
if(f[*i][y] == f[*i][*j])
{
return 0;
}
}
return 1;
}
|
|
|
|
|
Hi Pallini, many thanks in advane. Yes, my stepper motor driver supports serial port communication.
Sahih
|
|
|
|
|
Hi,
sahih wrote: Yes, my stepper motor driver supports serial port communication.
That's fine. Now you should study the driver documentation in order to know what you need to send on the serial line.
Have you such a documentation?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
If this in reference to a previous thread, then you should have continued the conversation right there. You need not (and should not) start a new thread for every message that you post.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I am able to get my *->DevicePath variable to pass to CreateFile (displayed a bit below) however I am unable to get a proper handle. It seems that no matter which attributes or whatever I change to my CreateFile function, the function ALWAYS returns INVALID_HANDLE_VALUE
\\?\usb#vid_04e6&pid_5116#5&9b0a1df&0&1#{50dd5230-ba8a-11d1-bf5d-0000f805f530}
Is it that I have an improper *->DevicePath name, or is it something with my CreateFile? Or am I missing a step here? Any help would be greatly appreciated!
|
|
|
|
|
Hi Forum
I am new in VC++ and i want to make a application which will recovery deleted file from Pen Drive?Can any one give me tips or source link?Plz hep me for find solution.
Thank's
Mike
|
|
|
|
|
Check TestDisk[^]. It is open source and has the following features among others:
# Undelete files from FAT, NTFS and ext2 filesystem
# Copy files from deleted FAT, NTFS and ext2/ext3 partitions.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi everyone,
thank you to all who have helped me so far. I have a question about creating classes.
I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program.
My program is designed to retrieve information, that's it. Right now I have it working to retrieve the local computer name through a NetBIOS function. I do however want to learn how to do this through the registry.
Question Number one, is it more accurate to pull the computer name from the registry or from the NetBIOS?
Question Number two, can you retrieve the group policy that user is under as well?
Question Number three, where can I find a good reading for retrieving information via the registry? I have looked on MSDN and did not find a registry library.
Thank you in advance!
|
|
|
|
|
rbwest86 wrote: I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program.
What is the object in this case? What would its properties and methods be?
rbwest86 wrote: Question Number three, where can I find a good reading for retrieving information via the registry? I have looked on MSDN and did not find a registry library.
What about these and this?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
rbwest86 wrote: I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program.
I can't decide for you how your program should be designed. What I can do is point out that the organization of code, largely referred to as Design, is a fairly large subject. The good news is that much is known about the subject and it is therefore a well covered topic. Covered in writing in many Books as well as articles that can be found on the internet.
Specifically in terms of designing object oriented code, there are Software Design Patterns[^] that you should read about.
To conclude, one should prefer to read, learn and understand the subject of Software Design as opposed to asking people in internet forums how a specific program should be designed.
|
|
|
|
|
hello ,
can you please tell me what is patches in wnindow .for what they are usefull.
|
|
|
|
|
It's a piece of code added to software in order to fix a bug.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
A Patch is a windows terminology. An analogy for that - Surgeons re-operating a patient on his left eye that was missed last time mistaking right as the eye of interest.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Ahh! the old eye surgery analogy, classic. 
|
|
|
|
|
|
hello all,
Can you please tell me what is wsusscan.cab,By using it what all possible things we can do.
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Does anyone know of free source code or a free library for an open file dialog (i.e. choosing a file from the file system), based on the windows api directly (without mfc)? Thx in advance!
|
|
|
|
|
It's source is not available, but can't you just use GetOpenFileName() ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I wasn't aware of the api function GetOpenFileName(). Thank you!
|
|
|
|
|
Shhhhhhhhhhhh, it's a secret [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Or GetOpenFileNameEx .
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
i don't know how i would delete CString.format(_T("%f"),a) a is type double..so 5 is 5,000000...now i would like to replace("delete") all the 0s from last index of string to index different from 0. for example:
5,0000 -> 5
5,1100 -> 5,11
5,0015300->5,00153
I have function for printing..so something must be done there ...Here is also function:
<br />
void CcalcDlg::izpis(double a)<br />
{<br />
CString str;<br />
str.Format(_T("%f"),a);<br />
editbox.SetWindowText(str);<br />
};<br />
Plz help,
Thx
|
|
|
|
|
change (see [^]):
Aljaz111 wrote: str.Format(_T("%f"),a);
to
str.Format(_T("%g"),a);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|