|
If you have questions or comments then please use the Reply link, not the Email.
|
|
|
|
|
but i want to privately message you dont want leak my code please check the inbox kindly ... Thank you
|
|
|
|
|
Sorry, all help provided by CodeProject members is done in public through the forums on this website. If you want private help then you are in the wrong place.
|
|
|
|
|
Oh, this explains why I got an email that contained code but couldn't find the same message on this board.
Sorry, I don't do code inspections. If you don't know how to use a debugger, you need to learn now. The days when I wrote code with very few errors are gone. I wouldn't be able to do anything without a debugger now. They're so much better and easier to use than they were 40 years ago that I just focus on the design and then use the debugger to fix the details that I got wrong.
|
|
|
|
|
Okay may be i disturbed everyone here for nothing... I'm really sorry for stupid questions. I do actually know how to debug you sir when you get stuck only then you ask for help... but that debugger get the job done after 7 hours ... and Richard's steps may be helpful but it is very difficult for me to understand it you know... Anyways
Thank you for your help, i appreciate your help
|
|
|
|
|
If you can't write a function to search for a specific character in a text file, ('\n'), counting how many times you see that character, your code isn't worth hiding.
|
|
|
|
|
I am creating a program where if an action occurs then a message box through visual basic script (.vbs). I plan to do I through a fstream file.
if (statement)
{
open fstream file }
|
|
|
|
|
And what is your question?
|
|
|
|
|
|
Probably, yes.
What program/app should execute this VB script?
|
|
|
|
|
|
VS is not to "execute", it's just to design!
Please, explain more carefully what you are going to do with your VB script. And what for?
|
|
|
|
|
|
Why on earth would you want to use a VBScript from C++ to show a messagebox?
|
|
|
|
|
Hello Folks,
Can anyone please help me to solve this runtime issue I am facing while running the application in debug mode? the error is as follows:
Debug Assertion Failed!
Program: C:\WINDOWS\SYSTEM32\mfc140ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp
Line: 925
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
The application is breaking at
ASSERT(IsWindow(pTemp->m_hWnd)); line in occcont.cpp file. Thanks in advance.
|
|
|
|
|
It means that window handle (pTemp->m_hWnd) is NULL. So this window does not exist.
Look at the call stack to find which line of your code causes this assertion failure.
|
|
|
|
|
It is a reasonable guess that pTemp->m_hWnd is not a valid Window handle. How that came about is impossible to guess. You need to use your debugger to gather more diagnostic information.
Also there is some information at Debug Assertion in occcont.cpp Line: 926[^] which may help. But either way this looks to be a Microsoft problem, so you should report it (with full details) to them.
|
|
|
|
|
Good Morning everybody.
I'm developing a program in C++.
It is supposed that the program has to read from excel and write the data in a .txt file. It has to do that during 10 minutes, and after that save the .txt and start doing it again.
How can I do the timer?
May you help me please?
The program I write is this one: (Not sure if is correct)
#include
#include
#include
#include
#include
#include
using namespace std;
struct vehiculo
{
char VIN[8]
char hora[19]
};
int main()
vehiculo cocheentrante
{
File *F;
File *G;
F = fopen("C:\Users\Ford\Usuarios\Cristales\VINES.csv", "rt");
if (F == NULL)
{
cout << "No se pudo abrir el archivo de entrada. \n";
}
else
{
cout << "El archivo se abrio correctamente. \n";
}
G = fopen("dd_mm_aaaa__hh_mm_ss.txt","w");
if((G = fopen("dd_mm_aaaa__hh_mm_ss.txt","w"))!= NULL)
{
while(!feof(F))
{
fgets(VIN,8,F);
fgets(hora,19,F);
fprintf(G, "%s %s", &VIN, &hora);
}
}
fclose(G);
fclose(F);
}
modified 17-Jun-20 5:31am.
|
|
|
|
|
|
How about create your program to just do the file I/O, and then let windows handle the timer/scheduling part?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
#include<stdio.h>
void main()
{
int t,j;
scanf("%d",&t);
for(j=0;j<t;j++)
{ int num;
scanf("%d",&num);
while(num!=1)
{if(num%2==0)
num=num/2;
else
num=(3*num+1);
}
if(num==1)printf("YES\n");
else printf("NO\n");
}
}
This is my small version of given problem , the constraint is very big please give new code which satisfy the constraint mentioned in the link
<a href=""></a><code><a href=""></a><pre><pre lang="text"></pre></pre></code><a href="https://www.hackerearth.com/practice/basic-programming/input-output/basics-of-input-output/practice-problems/algorithm/conject-it/description/">Conject-It ! | Basics of Input/Output & Basic Programming Practice Problems | HackerEarth</a>[<a href="https://www.hackerearth.com/practice/basic-programming/input-output/basics-of-input-output/practice-problems/algorithm/conject-it/description/" target="_blank" title="New Window">^</a>]
|
|
|
|
|
No.
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.
So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You should find another (algorithmic) approach. Dealing with such huge numbers (order of 2333) is far beyond the possibilities of the standard C/C++ integer types.
|
|
|
|
|
Just an observation...
The only condition that will exit the while() loop is when num is equal to 1 . The if() test after that will always print YES.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
A well known conjecture: Collatz conjecture - Wikipedia[^] (with many other names too).
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|