Is it possible to access file properties from c++ program? For example, user could drag file to program and then it displays a detailed information about file like date modified, size, type and etc..
I am interested in creating a file of a given size and then randomly accessing the file to populate it. Is there a way to quickly create, for instance, a 4 GByte file in C++, initially populated with garbage?
I have startes making a game where there is 3 ships that cross the screen verticaly, and the point is to shoot them down. So far I have actually managed to do this. I have also managed to add gamescore to the ships. But here is my problem, I cant find a way to combine the score from all three ships in to one score. I have all three ships in different classes, is that wrong? When I try to combine the scores, ship score1 cant see the other scores.
Do I need to somehow have all the ships in one class. Or are there a way to read the scores from three classes, and adding them up in to one in a new class?
One of the errors I get is "the name 'score1' does not exist in the current context.
I've been attempting to design a multiform WFA in Visual Studio 2010, but I'm so rusty with the language it's hard to remember how to do a lot of things, especially when it comes to visual programming, which my class only partially covered. I've never made a multiform application before, and my problem essentially boils down to how to pass data between forms.
My application is a simple item list and order form, sort of mimicking what you might see on a site like Amazon or eBay. My first form contains a drop down list and 'checkout' button. The dropdown list has been populated with an object collection, each object holding the product's name and price.
public partial class Form1 : Form { //Item class for dropdown menu public class Item { public string Name; public decimal Price; public string itemName
[Code] ....
When the 'checkout' button on form 1 is clicked, I want the Price and Name properties of the selected droplist item to appear in a pair of text boxes on form 2 for the purpose of lowering the user's cognitive load (if they can see what they've selected, it's one less thing to remember).
I've seen plenty of tutorials on how to send a textbox Text property between forms, but none for how to do this. As I said, I'm rusty with the language, and I'm pretty sure there's a better way to set up my combobox items, but I can't remember how to set it up.
public class MyClass { public int age { get; set; } } static void Main(string[] args) { MyClass testing = new MyClass(); testing.age = 44; Console.WriteLine(testing.age); }
output: 44
Code using regular variable declaration:
public class MyClass { public int age; } static void Main(string[] args) { MyClass testing = new MyClass(); testing.age = 44; Console.WriteLine(testing.age); }
output: 44
Why use the auto-implemented property when you can just as equally use the second code block to achieve the same thing?
I had written a "DLL" in VB.NET a year or two ago to read and set MP3 tags. I want to write this exact same library in C++ so I can convert it in my droid project, and to get a hands on introduction to C++. So far this attempt has been a total mind melt!
I am finally wrapping my head around .cpp and .h files so there is light at the end of this tunnel. Here is my problem now:
I wrote the VB project with properties for each tag in the MP3 file, then I could get and set them - easy stuff.
When I try this in C++ I get compile error: a property can only appear within the definition of a managed type. I can usually stumble through Google searches and figure out this type of stuff on my own, but this one is stumping me -- I think I am missing some fundamental stuff here.
My code:
// MP3Tags.h #pragma once; #include <string> using namespace std; using namespace System::IO;
I have been trying to make a custom control(list box with more features). I know how to setup custom properties, but how do I make it so that the property can be edited in a separate window ?
I think I figured out how to show the form itself, and I don't know how to make the [...] button like :
There's not much Custom Control tutorials out there, and that's really the problem here.
Well I know how to pass values between forms using get and set properties. But the problem with it is everytime I want to pass values from form2 to form1 it doesn't appear. To make it appear I have to type form1.Show(); which open form1 a second time and then show the value. Is there any way I could make it appear without using form1.Show();?
Kinda like in properties, where you choose the height and width of the window, but in actual code. So everybody who open my program see the same window.
I'm trying to get my head around threading and gui applications for fun, and I've ran into a problem I'm not too sure how to google it correctly or I don't understand the answers given. Basically I'm trying to access GUI item properties (add to a listview). I've been on stackoverflow alot, and I've noticed that accessing these properties is quite difficult. At least, I'm not really understanding how it is supposed to be done.
The following line gives me a null value.
frm.lstChat.Items.Add(newList);
From what I understand I need to access my form object instead of creating a new object window... but I'm not sure how to reference the initial form application.
using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Net.Sockets; using System.IO; using System.Threading; namespace ModBot {
How can I write my own container which has properties of both vector and list.
E.g. I can access elements directly using [] operator like vector and behave like list in terms of memory (means we don't have to shift elements if we want to insert in between like list)....
I want to make such application in which user make directed graphs along with relations between them. After that application show that which graph properties are proved in this graph e.g Reflexive, Irreflexive, Symmetric, Anti Symmetric, transitive etc
How would you create a video game in c++? I'm not sure really how to display the graphics and set properties and do all that stuff. I don't have money to buy a book about so how do you?
if we don't provide the acces modifiers for base class and we need to manipulate the private data of base class in derived class. Is there anyway to acces the private data members? Here's a coding example
class A { private : int a; }; class B : public class A { public : void displayA() { cout<<a<<endl; } };
how i can acces the a of base class A in derived class B without acces modifiers.
I'm developing C++ application in visual studio 2012. I have couple of C++ projects in my solution. I have put some library paths in every project's properties ( i.e ,Config properties - > C/C++ - > Additional Include Directories and Linker - > Additional Include directories ).I developed in debug mode, if i change to release mode, all library settings gone.Is there any possibility to retain all settings when change to debug to release mode and vice versa ?
My problem: I want to make an application that is going to block the action of some files (It is anticheat files actually).
how do I make code to block the application's action?
Maybe there is another way to do that? I need to use Cheat Engine in game, and anticheat blocks it, so I thought if I'll block the activity of the anticheat it couldn't detect the Cheat Engine...
I have two cpp files.I m updating a value of an integer in one cpp file and i want to perform a specific function in the second file as per to the value updated in the first file. ie I m initialing the variable in the constructor. I have two buttons in the first cpp file. On clicking the first button I m updating the variable as 1 and on pressing button two , I m updating the variable as 2. I m retrieving this variable in the second cpp file with respect to the object created for the class in the first cpp file.
The problem is that i m not able tot retrieve the updated value in the second file. only the initialized value is being retrieved. neither 1 nor 2 is updated.
I have been searching through the forums and found a couple snippets of code and from that i came up with this. What i want to do is search for the specific movie code and then update the movie status from inactive to active (for argument sake).
Code: #include <stdio.h> #include <stdlib.h>
typedef struct SYSTEM_MOVIE{ int movie_code; int movie_dur; char movie_title[25];
I want to delete the folder from the file system, but I am getting error of access permission.
I want to change the permission of the folder so my program can delete it.
The problem I am facing on google search is I am getting results mostly for MFC code which is windows specific. However, I want to write a code in core C++ that works on all platforms like unix and windows.
I have a .png file that my console app reads and puts into a structure that is saved as a file. The png is always the same so I thought I could just add it as a resource image to a resource file so it would be included in my program and not as a separate file. When I did that, the png shows up as a "SystemDrawingBitmap". If I examine this resource in a watch I see "Base" and "Static" members. Expanding those properties does not give me anything useful such as a pointer to the raw png data and its length in bytes.
If worse comes to worse, I can always make a hex dump of the png contents and then put the hex code into a CS file using static initialization.
Surely there is some way I can access the raw data internally and read the bytes into a byte array using C#
i have to upload a ms access database file to the server from my client program. The server program should connect to this database and read the data. What's the easiest way to upload the file? Is it FTP? i tried sockets, but it only allows like 9kb of data transfer capacity.