49,761 Topics
| |
Help needed with a function problem I really cant solve. Why is it that RegOpenKey() returns error success even though it fails. First it fails to return a handle with a valid Registry key/address filling the key paramater with nothing 0 but returns 0 aswell indicating an error_success right? because … | |
Hello. I read about the daniweb api competition thing and I have an idea of what I want to create. I have never done anything webby before (aside from using dreamweaver to make websites) and I think its about time that I did! I am hoping that it is possible … | |
Hi, could anybody please tell me what i am doing wrong in this program. The goal is to read the student name and grade from a text file and print it on the screen. This is what i have so far. by the way this is for a school project … | |
I have this code that is supose to just display "Hello Hacker!". But when ever I run it it gives a segmentation fault error #include <stdio.h> char code[] = "\xba\x0e\x00\x00\x00\xb9\x4\x90\x04\x08\xbb\x01\x00\x00\x00\xb8\x04\x00\x00\x00\xcd\x80\xbb\x00\x00\x00\x00\xb8\x01\x00\x00\x00\xcd\x80"; int main() { void(*func) (void); func = (void*) code; func(); } I am trying to run it on linux btw. … | |
What is Function Overloading and Operator Overloading? | |
I don't understand this code: T& operator[](int index); const T& operator[](int index) const; And, declared in the private is this: T *ptr; What does this mean? | |
So I need this libpng to be statically link with my dll to be used by my exe. This dll is already done before until I switch my compiler from MSVC to MinGW, then this dll won't work anymore so I think I should rebuild it **again** through MinGW. Now, … | |
I am trying to add a comma to the end of each line ('\n') of a text file til the end of the file is reached. I am opening the file in append mode but am unsure as to how to go about identifying when the end of line is … | |
Suppose my file a.txt has "ABC" written in it. Now I want to write a small b before capital B in the file. How will I do it? I've tried to do it but i'm having problems. 1. When opened in app mode seekp doesn't work. 2. When opened normally … | |
I have a header file, but I don't know how to do it: I am new to templates. template <class T> class Array { public: Array(int l, int h); Array(int s); Array(const Array& other); ~Array(); T& operator[](int index); const T& operator[](int index) const; int get_size() const {return size;} private: int … | |
Hi Everyone, I have a program that takes data in a two dimensional array, performs simple calculations, and then writes the data to a file. When I call the function that calculates and writes, I get an error on the two dimensional array stating: "argument of type 'int' is incompatible … | |
I recently got a question by my tutor to wite a program in C++ and the question is as follows so can someone else try out with it by writing another program in C++ since i have already written it in 2 ways and would like someone else to try … | |
I'm trying to run a file called configure.bat which contains the following: echo off mkdir Platforms mkdir Platforms\bb2010wm FOR /F "tokens=2* " %%A IN ('REG QUERY "HKLM\SOFTWARE\CodeGear\BDS\7.0" /v RootDir') DO SET BCB2010_ENV_ROOT=%%B cd Platforms\bb2010wm ..\..\build\cmake\bin\cmake.exe -G "Borland Makefiles" -D CMAKE_C_FLAGS:STRING="-g0 -tWM -WU -x -xd -w-8012 -w-8027 -w-8026 -w-8066 -w-8022 -w-8004 … | |
so i have a mini text adventure game where i can go through the rooms and have made a start trying to implement a inventory, i can type things in and store them in a text file, but i want to be able to find an object in a room … | |
I am getting an iphone soon and would like to write some programs for it using c++, I know all about apple and objective c but I want to use C++, as I am more skilled in C++. So is there a compiler out there that will enable me to … | |
I'm using windows 8 and I wanna know can I cross compile a C++ program for symbian Belle?How? Thanks | |
Hello, I read a large file (>7GB) from disk. The file is as set of attributes like this: 0.2,0.3,0.5,0.6,0.8 0.5,0.7,0.2,0.2,0.5 . . I want to read only the first columns(i.e. 0.2, 0.5,...) into a vector. I do not need the other columns. The problem that when I use the fstream … | |
Is there a simple function that will allow me to output an out file stream to hex from an int. Let me give you an example of what I am trying to do. { ofstream out; out.open("c:\\test.txt"); for(int i = 0; i<20;i++) { out::ios::hex<<i; }; the above code does not … | |
how to get the source code to dll that are already build?? because the source code is my clear all, and only the remaining dll.. how you can help, thanks :) | |
`Inline Code Example Here`Can anyone please give me the code for copy detection. OBJECTIVE: A program that detects copied codes.<o:p></o:p> Sometimes students tend to submit copied assignments and detecting copy cases manually can be very time-consuming. You are going to write a simple software that compares two files word-by-word and … | |
I am building a game similar to the tron game. I want to use the arrow keys to control the movement of the player. I do not have all the code completed but attached what I have so far. #include<iostream> #include<string> #include<conio.h> #include<Windows.h> #include<cstdlib> #include<ctime> using namespace std; //Declarations bool … | |
My program is working perfectly but when I want to initialize the default constructor which is all zero's it prints -9.25596e+061 . Hier is the code : class Sales { private: static const int QUARTERS = 4; public: double sales[QUARTERS]; double average; double max; double min; Sales(); Sales( double ar[]); … | |
Hi, In Windows 7 (and possibly older, can't remember off the top of my head), you can select which icons appear in your taskbar and which ones are only visible if you click the up arrow. Is there a way to set this default programatically? If it's relevant, my current … | |
I'm making an address book for class and i'm stuck. The teacher helped with some of the code I already have. Sorry for the lack of comments. I need help with the function to add records and then save them. Thanks #include <iostream> #include <fstream> #include <iomanip> #include <string.h> using … | |
| I'm a computer science major and I'm taking an intro to C++ programming course. I have to write a program that reads in the data from a .txt file and echoprint it, and also print the data again but with every fifth word with 10 underscores. I was able to … |
| Hey, we just started learning functions in class. We were given a project to complete. I'm trying to work out the errors, but I'm stuck with error C2084: function 'void bubblesort(int [],int)' already has a body error C2084: function 'void print(int [],int)' already has a body error C2084: function 'void … |
Hello again everybody. I have a question which may be very basic for allot of you, so here it goes. I want to understand the process of creating makefiles. I've I realise there's some books out there like 'Mastering Cmake' and 'GNU Make' which describe the insides of these things, … | |
Hey guys, I have been reading the forum for a while, but I couldn't find anything that could help to figure out my current assignment. Its a very simple program, but somehow just doesn't work for me. I'm a beginner and I hope that somebody can explain what am I … |
The End.