Re: C++ College Prank Programming Software Development by cirol Pranks can be fun, but fake viruses might cause real worry and problems. It’s best to use your skills in ways that don’t upset or confuse others. Re: My php is showing wrong results of time difference Programming Web Development by Dani > Also just one more question regarding your code, I will have to minus 1 hour from the total hour difference, do I have to use the %h - 1? Just in case you haven't figured this out yet, the answer is no :) In my code above, see where I am showing you what $diff looks like on line 15? You should be able to do something like this: $… Re: What should I look for in a reliable web design and development agency? Digital Media Digital Marketing by graceweb Hi Sasha, I really agree with your point about clear and consistent communication, without it, even the most skilled agency can fall short. I’d also add that flexibility is important too. Sometimes project needs change mid-way, and it helps to work with a team that can adapt without losing sight of the overall goals. H Re: My php is showing wrong results of time difference Programming Web Development by Dani I am confused when you say the HTML time picker input box can be set to 20:00 for time in and 5:00 for time out, because `<input type="time" ...>` only allows the end-user to specify a time, not a time and date combination. Should it always be assumed that if the time out is earlier than the time in, that it is the next day? … Re: My php is showing wrong results of time difference Programming Web Development by Mr.M Thanks, to clarify what I meant regarding the dates is that I have a date input that shows a calendar when a user click on it to choose the date for which the register is being marked for. Then I also have 2 time inputs one is for timein and the other is for timeout. Let me try your code and see if it does solve the problem I've been having.… Re: My php is showing wrong results of time difference Programming Web Development by Dani In other words, if you just need days or hours you can do something like `$diff->d` or `$diff->h` (All properties available [here](https://www.php.net/manual/en/class.dateinterval.php), but if you want to calculate a runner's start time and end time and then do something like "You ran the race in 08:33:56!" then you could use the `… Re: Looking for a online dating service template Digital Media UI / UX Design by Alex_188 Hi Tim, check out ThemeForest or TemplateMonster for dating templates with profiles, location filters, and payment options. Choose ones with good documentation and Stripe or PayPal integration for secure payments. This’ll help you avoid building from scratch and focus on customizing while learning payment setups gradually. Good luck! Re: Show computer name on a label Programming Software Development by toneewa For VS2010 project support in VS2022, to compile your example I did the following: Created header stdafx.h: #pragma once #include <iostream> #include <fstream> #include <sstream> #include <string> #include <Windows.h> #include <WinSock.h> #include <msclr/… Re: Show computer name on a label Programming Software Development by toneewa To get the VS2010 Visual C++ Windows Forms with VS2022 to work, I did the following: With your Visual Studio Installer make sure the .NET Desktop Development and Desktop Development with C++ workloads are installed. Created mr_m.h #pragma once #include <windows.h> using namespace System; using namespace System::… Re: Show computer name on a label Programming Software Development by Mr.M I'm using Microsoft Visual Studio 2010 (Visual C++ Windows Form Project). Regarding the test yes it doe compile/build/run with no error. Here are the includes #include "stdafx.h" #include <iostream> #include <fstream> #include <sstream> #include <string> #include <Windows.h>… H, what the best game script with databse Programming Web Development by abdullah_359 H, i am very happy to discover new friends , and would you like help me recently i have got domain and hosting i want to add the best game script with data bse , any body can help , plese design . Thank you . . . . . . . . . .h source file acting up Programming Software Development by hello11 Here is my code I'm pretty sure the problem has to do with using namespace std and the included header files but I can't figure it out (error string no such file or directory in .h, error iostream no such file or directory in .h,error syntax error before namespace) box.h: [code] #ifndef _BOX #define _BOX #include <string> #include &… .h file of class Programming Software Development by Dewey1040 So this is just the beginning of my questions, but I'm seriously having problems using classes in C++, I'm writing a program right now to plot points using asterisks on a 40 by 40 plain. right now I'm just trying to write the .h for the point class and i cant even get that to compile. heres what I have followed by errors I'm receiving... any help… Re: .h file of class Programming Software Development by sfuo I rewrote what you had out and included a "lib.h" file so you do not have to keep typing out all the includes. "point.h" [CODE] #ifndef POINT_H #define POINT_H class POINT { //for whatever reason most people that I see post put //"private:" here when classes are automaticly private at the start double x… Re: .h file of class Programming Software Development by Dewey1040 for some reason I'm still getting the same error for rectangle.h when I attempt to compile lib.h... here is rectangle.h and lib.h [code=C++] //rectangle.h #ifndef RECTANGLE_H #define RECTANGLE_H #include "lib.h" class RECTANGLE{ POINT* p; double length; double width; }; #endif //lib.h #ifndef LIB_H #define LIB_H #include <… Re: .h file of class Programming Software Development by Dewey1040 I made a makefile and when i type make i get the error messages: point.h: In function ‘int main(int, char**)’: point.h:16: error: ‘double POINT::x’ is private main.cpp:35: error: within this context point.h:16: error: ‘double POINT::y’ is private main.cpp:36: error: within this context point.h:17: error: ‘POINT* POINT::next’ is private main.cpp:37:… Re: .h file of class Programming Software Development by Dewey1040 why include point.h instead of lib.h when lib.h has all the definitions needed? your suggestion works, but i just figured out if i just switch point.h and rectangle.h in the lib.h file it also will compile. Re: .h file of class Programming Software Development by Dewey1040 I dont know how to make the constructor for arrayholder.h... here are my .h and .cpp files the 2d array a is supposed to hold two values one the x coordinate and one the y coordinate of the points to be plotted arrayholder.h: [code=C++] #ifndef ARRAYHOLDER_H #define ARRAYHOLDER_H #include "point.h" class ARRAYHOLDER{ char a[40][40]; … Re: .h file of class Programming Software Development by sfuo In your "rectangle.h" file change "lib.h" to "point.h" Re: .h file of class Programming Software Development by Dewey1040 Ok so i did all that now im getting the errors main.cpp:(.text+0x1fa): undefined reference to `POINT::setX(double)' main.cpp:(.text+0x21f): undefined reference to `POINT::setY(double)' main.cpp:(.text+0x231): undefined reference to `POINT::setNext(POINT*)' main.cpp:(.text+0x256): undefined reference to `POINT::setX(double)' main.cpp:(.text+… Re: .h source file acting up Programming Software Development by Ancient Dragon >>error string no such file or directory in .h What compiler are you using? That error would indicate you are usiing something readlly really old, like ancient Turbo C what knows nothing about <string> header file. Re: .h files Programming Software Development by siddhant3s >what i have learned is that we donot use ".h" in VC2008 like : i use "iostream" not >with ".h" Most of the C-header files like (stdio.h, string.h, math.h,) are now comes with stripped [B].h[/B] and a [B]c[/B] added before there name. stdio.h --> cstdio string.h --> cstring math.h --> cmath Further, … Re: .h file of class Programming Software Development by sfuo Thats what I thought at first but it doesn't work like that and in the .cpp files you have to include "lib.h" and not just its header file or it will do the same thing saying that stuff doesn't exist. Re: .h files Programming Software Development by Ancient Dragon [QUOTE=arshad115;822248]o yes,it is "stdio.h". what i have learned is that we donot use ".h" in VC2008 like : i use "iostream" not with ".h"[/QUOTE] That's not really correct either -- there are thousands of header files with .h extensions used in c++, such as windows.h because there are no equivalent … Re: .h file not found? Programming Software Development by Stack Overflow I agree with cscgal, I have stated this time and time again: [b][u]The difference between iostream and iostream.h (summary)[/u][/b] You should avoid using the *.h version as much as possible, because some implementations have bugs in their *.h version. Moreover, some of them support non-standard code that is not portable, and fail to support… Re: .h files Programming Software Development by siddhant3s If it is a standard header, (like cstdio, iosteram, fstream, string, cmath, cstdio etc.) #include<iostream> instead of #include<iostream.h> [B]But[/B] if your header is non-standard (like gtk.h, sockets.h or myHeader.h) then you should #include<gtk.h> or #include<socket.h> If the header file is home-made, you should … .h/.C ? Test pgm ... what goes where? Programming Software Development by crq ok, here's the scenario (and maybe i will finally get this assignment finished) ... i have a class IntArray. at the moment i have it all in a .C file. i have a little main section that has minimal testing in it (will do something more formal later). my prof. wants us to "split" it into an IntArray.C an IntArray.h and a Test.C. i … Re: .h/.C ? Test pgm ... what goes where? Programming Software Development by Narue [code] // Class.h class C { int i; public: C(); public: int geti() const; }; [/code] [code] // Class.cpp #include "Class.h" C::C(): i(0) {} int C::geti() const { return i; } [/code] [code] // main.cpp #include <iostream> #include "Class.h" using namespace std; int main() { C c; … Re: .h/.C ? Test pgm ... what goes where? Programming Software Development by crq WOW!! thanks!! i will try that. cr1 [QUOTE=Narue][code] // Class.h class C { int i; public: C(); public: int geti() const; }; [/code] [code] // Class.cpp #include "Class.h" C::C(): i(0) {} int C::geti() const { return i; } [/code] [code] // main.cpp #include <iostream> #include "Class.h&… Re: .h files Programming Software Development by ArkM >there are thousands of header files with .h extensions used in c++... The most interesting thing (for internal use only;)): those thousands of files are not [i]headers[/i]! All C++ [b]headers[/b] are enumerated in the C++ Standard with the note: [quote]A header is not necessarily a source file, nor are the sequences delimited by < and >…