Hi i want to know what programs installed on my system, i use MsiEnumProducts and MsiGetProductInfo functions, but not all application what i can see in "Add/Remove Program" i get by this functions.
When I type in the foll. code, I get the output as 1073741823.
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <int> v;
cout<<v.max_size();
return 0;
}
However when I try to resize the vector to 1,000,000,000, by v.resize(1000000000); the program stops executing. How can I enable the program to allocate the required memory, when it seems that it should be able to?
I am using MinGW in Windows 7. I have 2 GB RAM. Should it not be possible?
In case it is not possible, can't I declare it as an array of integers and get away? BUt even that doesn't work.
Another thing is that, suppose I would use a file(which can easily handle so much data ).
How can I let it read and write and the same time.
Using fstream file("file.txt', ios::out | ios::in ); doesn't create a file, in the first place. But supposing the file exists, I am unable to use to do reading and writing simultaneously.
WHat I mean is this :
Let the contents of the file be 111111
Then if I run : -
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
fstream file("file.txt",ios:in|ios::out);
char x;
while( file>>x)
{
file<<'0';
}
return 0;
}
Shouldn't the file's contents now be 101010 ? Read one character and then overwrite the next one with 0 ? Or incase the entire contents were read at once into some buffer, should there not be atleast one 0 in the file ? 1111110 ?
But the contents remain unaltered. Please explain.
Thank you.
Hello!
I am currently on a project which has been buggy for a long while, now I suspect, among other things, that there is pointer errors in the code.
The program is written in native C++ using COM and uses out-of-process COM servers.
Can anybody give me some tips as how one would go about finding these errors?
Is there specific things to keep in mind, ways to do it, etc...
Is there a good resource to get run times for standard API functions? It's somewhat confusing when trying to optimize your program. I know Java isn't made to be particularly speedy but I can't seem to find much info on this at all.
Example Problem:
If I am looking for a certain token in a file is it faster to scan each line using string.contains(...) or to bring in say 100 or so lines putting them to a local string them performing contains on that chunk.
I love desktop and web programming, but I would like to be able to program some sort of small device I can then carry with me. Most mobile phones are quite hard to create programs for as they want you to buy the things they offer instead.
What mobile-phone/gameboy size devices would be suitable for my goal?
Hi guys, any solution to this problem - given a list of numbers [1,2,3,4,5] write a Prolog program to sum up all the odd-positioned in this list ?
odd([1,2,3,4,5],Sum)
Sum = 9. (1+3+5)
I have recorded a macro in Excel, but I want to run this code in Google spreadsheets. I do not know how to program in either code. How do I convert them? I tried an online VB to Javascript converter, but this does not work with VBA.
Hi everyone ..
Iam a absolute Beginner in QT..
i am trying to create window that has only text and one push button when you press it, you will get another window that has menu for program ..
but Unfortunately, i didn't know how can i create new window and connect it with main window!
so, i need to helping you
My multithreaded Java program crashes because it runs out of heap space and I don't think it should. Assuming the culprit is unintentional object retention, what's a good free tool to investigate what objects are being unintentionally retained?
My IDE is Eclipse.
I'm writing a program in C# that will save lots of data points and then later make a graph. What is the best way to save these points?
Can I just use a really long array or should I use a text file or excel file or something like that?
I know php scripts don't actually compile until they are run. However say I want to create a small simple program and compile it to a binary without requiring the php binary. How could I do this?
I'v seen a few IDE's out there that would do this, but either they are all for windows or the linux versions don't actually build properly.
What I would like is something like py2exe that does it in the script itself.
I have a hexadecimal string "41464353". I want to convert it into bytes. I know the value of this hex string in byte will be "65706783". I want this as answer. Please give me a program for this in Java.
Where do I find the lib files for linking my program when using some Boost libraries?
Decided to try its threading functionality but I am getting
Error 6 fatal error LNK1104: cannot
open file
'libboost_thread-vc90-mt-gd-1_42.lib' InterviewPractice
after I include
Error 6 fatal error LNK1104: cannot
open file
'libboost_thread-vc90-mt-gd-1_42.lib' InterviewPractice
I can't find where to get the .lib files for proper linking on the boost website?
Any tips? :)
I just came back to C++ Builder after 5 or more years away. I seem to remember a nice tool where I could drag its pointer over the GUI of my running application and get lots of info about what was pointed at - handle, size, text, parent, children, etc
IIRC, if the exe include debug info I could also get the actual variable name as used in the source.
Does anyone know what program I am talking about? Thanks
Hello guys
I am a web developer and sometimes I have to do some design myself for my customers but design actually is not my best thing to do. I am looking for a program that can help me getting fast and reliable design ideas but I am not looking for code generator like Artisteer.
Actually design is a hard task and my designs always look ugly and messy.
I have a datatable having 44 rows.
I have converted that to list and want to take the rows from 4th row till the last(i.e. 44th).
I have the below program
IEnumerable<DataRow> lstDr = dt.AsEnumerable().Skip(4).Take(dt.Rows.Count);
But the output is Enumeration yielded no results
I am using c#3.0
Please help.
i can get file name via below codes. How can i send this file to remote computer. this remote computer ip: 192.168.2.105 also i can use 51124 port
class Program
{
static void Main(string[] args)
{
string[] dosyalarinYollari = System.IO.Directory.GetFiles(@"z:\20071008\1.2.392.200036.9116.2.6.1.48.1215563310.1191800303.305777\", "*.dcm", System.IO.SearchOption.AllDirectories);
foreach (string s in dosyalarinYollari)
{
Console.Write(s+"\n"); // i need to send tihs s file to remote machine
}
Console.ReadKey();
}
}
Hi there, I'm having trouble working this out. Basically my program has a standard input, I want to modify this so if the user enters a space it automatically replaces it with a / whilst they're typing. I have no idea how i'd even go about doing this or if it is even possible so I am grateful for any help either way.
By default certain programs format their output according to the type of the stream they write to. For example, the output of ls and ls > file looks differently. I'd like to know how this is achieved by a program. Additionally, is there a way by which we can trick such programs as if the output stream is a terminal where it actually is a file (especially when they don't have any options that affect output formatting)?
Hi,
can any one please send me the project(in android) where there is only client program which can connect to server and read the response from the server.send to my mail id [email protected]
Thanks and Regards,
Pushpa
Hello everyone,
Is there a possibility to take a picture using phone's camera without user interaction?
I'd like to write a short app that only takes sequence of pictures and the user should be able to set number of pictures, location, quality and time between shots. After starting the app should take pictures without further interaction. This program should for examlple take a sequence of 250 pictures of moving clouds so I could make a ten second movie from those pics.
Greeting
and sorry for my english ;)
i have to convert a video to images i need some help to under stand this phenomenon and guid to code a program for it.
also
which format of video will be more useful for me ?
thanx in advance!
Hi,
I would like to create a program wich communicates between pc and an android mobile connected to USB via tcp/ip. Is this possible? How can I get the IP-address to a connected mobile from PC or the other way around?
Any help appreciated
I am writing a program that will need to measure time in minutes.
To be exact, it will wait 10 minutes, execute some code, wait 2 minutes, execute more code and repeat this 5 times (anyone guess what I'm trying to do?) and I am wondering how to do the breaks.
Thanks in advance!
Oh, and by the way, I'm on Mac.