49,761 Topics

Member Avatar for
Member Avatar for c0DEZOMBIE

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 …

Member Avatar for c0DEZOMBIE
0
464
Member Avatar for Labdabeta

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 …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for josey_matt

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 …

Member Avatar for siddiquedu
0
8K
Member Avatar for MasterHacker110

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. …

Member Avatar for MasterHacker110
0
140
Member Avatar for chrispitt
Member Avatar for TuteePink

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?

Member Avatar for mrnutty
0
147
Member Avatar for mark5rockzz

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, …

0
68
Member Avatar for Jorox03

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 …

Member Avatar for Jorox03
0
4K
Member Avatar for MRehanQadri

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 …

Member Avatar for MRehanQadri
0
222
Member Avatar for slyton
Member Avatar for TuteePink

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 …

Member Avatar for TuteePink
0
99
Member Avatar for breezett93

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 …

Member Avatar for Labdabeta
0
3K
Member Avatar for Avneet1993

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 …

Member Avatar for tinstaafl
0
174
Member Avatar for davecoventry

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 …

Member Avatar for gusano79
0
549
Member Avatar for nomorelogic

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 …

Member Avatar for Moschops
0
2K
Member Avatar for MasterHacker110

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 …

Member Avatar for Schol-R-LEA
0
321
Member Avatar for massivefermion

I'm using windows 8 and I wanna know can I cross compile a C++ program for symbian Belle?How? Thanks

Member Avatar for massivefermion
0
126
Member Avatar for sameh.abdulah.1

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 …

Member Avatar for Ancient Dragon
0
270
Member Avatar for CodyOebel

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 …

Member Avatar for gerard4143
0
138
Member Avatar for lecet98

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 :)

Member Avatar for Ancient Dragon
0
52
Member Avatar for aroojasif22

`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 …

Member Avatar for aroojasif22
0
159
Member Avatar for arcticman452

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 …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for ilian.bonov

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[]); …

Member Avatar for ilian.bonov
0
139
Member Avatar for dshiells

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 …

0
148
Member Avatar for kortneycoles

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 …

Member Avatar for kortneycoles
0
172
Member Avatar for cnet1989

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 …

Member Avatar for mike_2000_17
-1
614
Member Avatar for rpcob

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 …

Member Avatar for Captain119
0
4K
Member Avatar for christinetom

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, …

Member Avatar for Tumlee
0
256
Member Avatar for SA_PlaYeR
Member Avatar for yuugib

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 …

Member Avatar for meggy12
0
330

The End.