C/C++ :: Console RPG SHA-256 Checksum

Jun 29, 2014

So I'm making a console rpg and after the task of making my save/load functions I began making a sha-256 checksum so the save file can't be edited. I've pretty much all of the code but when I save the game and the checksum of that save file with my save function, I go back to load it and it always goes to the statement that says the checksums do not match and when I check the chksum.dat the hash is the same every time, here is my code:

#include <iostream>
#include <conio.h>
#include <windows.h>
#include <string>
#include <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <windows.h>
#include <fstream>
#include "sha256.h"
using namespace std;
void MaximizeWindow() {

[Code] .....

View 3 Replies


ADVERTISEMENT

C/C++ :: MD5 Checksum Mismatching On Windows And Linux?

Feb 17, 2014

I have implemented MD5 checksum algorithm by using C language, but it is resulting correct value in windows but not in Linux?

// Constants are the integer part of the sines of integers (in radians) * 2^32.
const uint32_t k[64] = {
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee ,
0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501 ,
0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be ,
0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821 ,

[Code] .....

View 2 Replies View Related

C++ :: Open Other EXE New Console?

Oct 11, 2014

Main console: qwer.exe
Secondary console: asdf.exe

System(c:asdf.exe);

I wanna open this asdf.exe new console. Not in the qwer.exe.

View 1 Replies View Related

C# :: Console App Won't Close

Dec 22, 2014

Im having a problem with the below code within a console app, I am copying and pasting data across server locations, the copy works fine but it looks like the app wont close and I am left with the screen (Shown in attachment). I want to run this in part of a batch process but because the app stay open it wont move onto the next task.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace SQL_Backup_Move_Files {

[Code] ....

View 3 Replies View Related

C++ :: How To Use Mouse In Win32 Console

Jan 28, 2014

I want to show and control mouse in Win32 Console. What should I do? And I want to learn MFC programing.

View 3 Replies View Related

C++ :: Adding UI To Console Application

Apr 6, 2013

Any tutorials on adding a UI to a console application? All I really need is a button that will run one function every time I click it.

View 1 Replies View Related

C++ :: Output To Console And Log File

Apr 4, 2013

I have 18,000 lines of code that i would like to upgrade to include a log file. I want to replace the cout with a stream or something similar so that i can easily output to the console and to a log file at the same time with minimal change to 18,000 lines of code. I'm nearly there.

I used this post heavily as a reference; [URL] .... however it is highly incomplete and this is above my knowledge so I'm struggling somewhat.

I was able to get the bulk of it working with some guess work and modification to the code from that link.

For some reason i had to comment out "mstream(void);" and "~mstream(void);"

Also how to get :

mstream& operator<< (ostream& (*pfun)(ostream&)) {
pfun(coss);
pfun(cout);
return *this;
}

to work for endl as per the previous link. Not sure if i'm even putting it in the right place. Otherwise the code works fine for streaming to both locations and such. See the code below;

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class mstream {

[Code] ....

View 9 Replies View Related

C++ :: Console App - Outfile Results

Aug 5, 2013

I have created a game that functions correctly, however, for balancing and future changes, I would like to record results .txt document (its 1v1 btw). I already have code to determine who won and what I am looking for is some way to keep track of different match-ups for the different characters. Im looking for something like this:

loser
Winner char1 char2 char3
char1 3 2 5
char2 2 5 4
char3 8 1 2

the numbers are the amounts of wins a given character has over another character. I'm looking for code to open the .txt file and add 1 to the respective win total so I can do balance changes and such.

View 1 Replies View Related

C++ :: Console Applications Keep Crashing

Jan 11, 2013

Any time I run my program after I make a selection from the menu the output is printed on the console screen then immediately a windows screen comes up saying project.exe has stopped working.

Below is my code, and I suspect the error has something to either

A) due with how I'm calling the method or
B) how I have the method coded.

Main
#include <iostream>
#include <fstream>
#include <string>
#include "telephone.h"
#include "tbook.h"

[Code] .....

View 4 Replies View Related

C++ :: How To Stop Console From Pausing

Mar 6, 2014

Just a quick newbie question: I'm doing a console application and whenever I open a .exe using system(), the console pauses and does not run the next instruction until I close this exe. For example when I do this:

...
system("mspaint.exe");
printf("Hello");

It opens ms paint and does not print the next message until Paint is closed. How do I work around this?

View 1 Replies View Related

C++ :: How To Hide Console Or Terminal

Jul 2, 2013

I want to hide a terminal appliction or console application without using WinAPI programming or <windows.h> or something like "ShowWindow(hwnd_win,SW_HIDE);

View 19 Replies View Related

C++ :: How To Stop Displaying The Console

Mar 6, 2013

I am trying to display a messagebox, but instead of just displaying the message box, there is also a console the pops up. How do I prevent the console from popping up? I'm using Visual Studio 2012. I'm creating an empty project, but I still get the console.

View 1 Replies View Related

C++ :: Open More Than One Console In One Program

Oct 22, 2014

I am creating a console based application which needs to be dual tasking, which prompts me to share a single console for the GUI console based and inputs from the user.

I want to know if there is a mechanism through I can open more than one command prompt so that I would use efficiently both of them.

Furthermore, I would need also to know how to control on which to print and on which not to be printed.

Is there such a thing?

I am using Visual Studio 2012 Ultimate on a Windows 8.1 Professional PC.

View 1 Replies View Related

C++ :: How To Have Console Recognize Every Word

Apr 6, 2013

#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;

int x;
string favword;

[Code] ....

I want this program to be able to recognize if a user types in any word ex. (apple, tree, house etc..) and print "system error" if a word is recognized not to be a number. The bold section of code is my failed attempt to try this. Basically I need to know what to make

(x = ?(every word)) in order to finish my console program.

View 1 Replies View Related

C++ :: Hold Screen Via GUI To Console

May 15, 2013

I had a program (on console) that uses a third-part software to draw some graphs. In order to hold the graphs on the screen, I used cin.get(); and that worked.

Now I created a GUI with Qt. The code remains generally the same. The code continues to call the software to draw graphs (during drawing graphs, there is a console opened automatically). Butcin.get(); in the code cannot hold the graphs on screen anymore. The graphs appear and disappear immediately.

View 4 Replies View Related

C++ :: How To Set Console Window Size

Oct 28, 2013

Can I make my c++ application to open in a specific sized console window. I want to open my project in n a bigger screen so that all my output is visible. is there any way to do this...

View 6 Replies View Related

C# :: Run Console App On Remote Computer?

Dec 22, 2014

I'm looking for a way to run my console app in C# on one computer, but the actual program is ran on another computer. IE I open the file or hit "Run" in Visual Studio on computer1, the computer2 runs the program. I was looking online and found some stuff that may be applicable, but I didn't see a very clear answer.

View 6 Replies View Related

C/C++ :: Linux Console Get Key State

Jan 23, 2014

I want to create command line game in Linux but I don't know to get the key state. I heard of getch() but that stops the program.

View 1 Replies View Related

C/C++ :: Console Input / Output?

Sep 7, 2014

I'm trying to write something that when a user is at the command line, the user can type and it displays of list of commands the user can use to run the application.

View 14 Replies View Related

C# :: How To Convert Console App To Winforms Or Other GUI

May 8, 2014

I have written a long console app (over 1000 lines of code) and I want it to have a GUI. I was wondering if there was a way to quickly convert it to Winforms or other GUI?

I already know how to include Winforms to a console app. But when I compile it, the Winforms does not include the Console app component of the program. My Form.cs includes the Winforms and Program.cs is the console app part with >1000 lines of code that I wrote before. Compiling it, only the part in the Form.cs runs. The Program.cs part doesn't run. For example, I have many "Console.Writeline" and "Console.Readline" parts in the Program.cs, but they run after I add the "Form.cs" to the program

Although the Form.cs runs, the Form.cs [design] doesn't show up

View 6 Replies View Related

Visual C++ :: Run MFC Application From Console?

Feb 7, 2013

I have a question about to run an MFC dialog based C++ application from console: if I run my application from console, I see the application start and the console immediately back to prompt. I need that console wait the application exit before show me the prompt again. I tried on Visual Studio 6, 2005 and 2010 but the behavior is the same.

View 3 Replies View Related

C++ :: Change Output Of Console?

Nov 4, 2013

is there a way to change output of console without clearing the screen? so making some kind of animation?

e.g.

I have used

Code:
cout << "Hello";

is there any way I can erase last "lo" and replace it by "p" so I will have "Help" without clearing the screen ? just changing the output like some text file?

I tried using something like this

Code:
#include <iostream>
using namespace std;
int main() {
cout << "abcd";
long pos = cout.tellp();
cout.seekp(pos-2);
cout.write("ef", 2);
cout.flush();
cin.get();
return 0;
}

but it doesnt work, there is still a "abcd"...

View 4 Replies View Related

C :: Program Console Output Being Interrupted

Mar 6, 2015

I am wrapping up a Linux/C programming assignment that requires several small programs for encrypting and decrypting text. There is a bash grading script which will be used to assess the performance of my programs. The script runs fine on my local machine and all of my tests pass, but when I run everything on my University's server via SSH, the script is not behaving the same. I am fairly certain the error exists somewhere in my C code, because no other students are having this issue. The 4 main programs consist of 2 daemons which wait for clients to connect via sockets, and the two clients. There is a daemon/client pair for handling encryption, and another for handling decryption.

And here is a screenshot of what happens with the same files on the remote server:As you can see, in the 4th and 5th tests (where the program's output should read), it's instead showing "ssIgnore this message". In later tests (not pictured) there is another message that reads "ddServer to client message". This text appears nowhere in my code or the grading script, so it must be server-side.

View 1 Replies View Related

C :: Make Console Application Run As Service

Sep 20, 2013

I'm trying to make this run as a service so that kbhit can be interacted with even when the console is out of focus. How would I do this?

View 3 Replies View Related

C :: Socket Programming And Console Control

Jan 4, 2014

I would like to make a program for final project, which can let me send any file to my computer at home, and i can access any files in my computer when i am not at home.sending and getting file will be with socket programming.

i would like to reach all folders in computer, not only the folder, where client program exist. how can i access other folders at remote computer by using my program?

View 4 Replies View Related

C++ :: How To Make A Game Map In Console Using Text

Oct 25, 2014

How would I make a game map in the console using text? The map is to be changed on a turn-based system. I've been thinking about using arrays.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved