51,593 Topics

Member Avatar for
Member Avatar for gerard4143

I have a question about function precedence. How does the compiler decide which function to call in quasi ambiguous situations? Is it laid out in the standard or is it implementation dependent? If you look at the attached code you'll see I'm outputting the value contained by the myint object. …

Member Avatar for gerard4143
0
99
Member Avatar for ram619

When i am trying to run a C program in Eclipse, it gives error. Saying, "launch failed, Binary Not found" Could anyone plz tell me how to put in Binaries into Eclipse........

Member Avatar for jonsca
0
79
Member Avatar for Vierco

This Code works fine, but i try add all Offsets and memory bytes into txt db, anyone have idea? i want read all lines from a txt to compare in memory... is for anticheat.. :) ex of txt.. Offset Memory Dump Offset Memory Dump.. but i donw know how use …

Member Avatar for douglaspr
0
132
Member Avatar for megaLU

Hi there, I'm trying to develop some old code (for a class to model affine transformations) which was working thanks to a Daniweb member. The old code is [CODE] void IFS::eval(float x, float y, float& a, float&b) { a = (matrix[0]*x + matrix[1]*y + matrix[2]); b = (matrix[3]*x + matrix[4]*y …

Member Avatar for megaLU
0
147
Member Avatar for MasterGberry

Pretty much what it says in the title, _orgDrspath = std::string, newDrsName = std::string [CODE]std::cout << "Opening original " << _orgDrsPath << std::endl; // Store all bytes into a variable called exe std::ifstream inFileDrs(_orgDrsPath, std::ios::in | std::ios::binary); inFileDrs.seekg(0, std::ios::end); size_t len = inFileDrs.tellg(); int newLen = 1024*1024; char *theDrs = …

Member Avatar for MasterGberry
0
164
Member Avatar for shiny27

Hi... I want to insert a variable [I]finalScore[/I] into an array [I]competitorsArray[competitorCounter] [/I]. I can't find any instructions anywhere on how to do this, so I'm wondering if it's even possible. Also, how do I output an error message if the user enters a number that I then store into …

Member Avatar for Ancient Dragon
0
193
Member Avatar for ankit,joy

I have to [B]sort around 12GB of integer data[/B] which is kept in a file. I have a [B]1 GB RAM[/B]. How should I do it? The problem is I cant read whole of data together and store it in a vector because it goes out of memory bound. Which …

Member Avatar for arkoenig
0
521
Member Avatar for cppgangster

Hi, I am trying to write function overloaded function template, but I get some kind of an instantiation problem and here is my code: [CODE] /* * File: main.cpp * Author: cppguy * * Created on 20 January 2011, 19:10 */ #include <cstdlib> #include <iostream> #include <cctype> #include <cwctype> #include …

Member Avatar for vijayan121
0
191
Member Avatar for fand2nd

Can someone pls explain to me this program is not running [CODE]#include <iostream> using namespace std; void writeBackward(string s, int size) // function definition { //opening brace if ( size > 0) { // opening brace for the condi cout<<s.substr((size-1), 1); //display the last chracter writeBackward(s, (size-1)); //display remaining characters …

Member Avatar for vinayakgarg
0
95
Member Avatar for HENRYSUGAR

Hi, I am trying to write a simple c++ script to learn more about file manipulation. First script is adding some info a file as a structure and second one is reading from the file. However when i try to read from my file it always shows the found values …

Member Avatar for HENRYSUGAR
0
164
Member Avatar for Ieako

[code=cpp] #include<stdio.h> #include<math.h> #include<stdlib.h> int minimal(int seed); int main (void)//random=countpassenger; { int check=0, tempEarnings, ctr4, info[17][31],ctr3,capacity=0, ctr, ctr2,denomination[6]={1,5,10,20,50,100}, x[6],seed, random=0, loose=0,y[17]={0}, a, change, money, passenger=0, destination, station, pay, payment, n ,km, earnings, out[17]={0}; int passengerlimit[17]={0,30,15,10,10,15,20,10,10,20,5,20,15,10,10,5,0}; printf("Hello, Good day!\nWelcome to our bus! Just seat back and relax.\n\n"); printf("Please enter the seed: …

Member Avatar for al john
0
166
Member Avatar for lin80

can u all help me how to write code to generate auto log file..based on date n time..

Member Avatar for lin80
0
29
Member Avatar for lanzslumber

Hello, I'm a beginner in these to programming language. Here I want to know how to display the actual value of variable of enum holds. Like this in C++: [code] #include <iostream> #include <conio.h> using namespace std; int main(void) { enum Difficulty { Low = 1, Medium, High }; Difficulty …

Member Avatar for ddanbe
0
248
Member Avatar for user543820

hi! i want to print a colored 'A' using putchar, let's say green. i am able to print * by doing just putchar('A'); but i don't know that how to print a colored 'A'. i have also tried to write: putchar('A',255); and also putchar('A',3); but no success.

Member Avatar for embooglement
0
274
Member Avatar for Spartan_MSU12

I am compiling my two .cpp files that are linked with header file. i am getting the error ~/...>g++ -o test.exe diamondtest.o main.o Undefined first referenced symbol in file Diamond::Diamond(int) main.o Diamond::Diamond(int, char) main.o ld: fatal: Symbol referencing errors. No output written to test.exe collect2: ld returned 1 exit status …

Member Avatar for daviddoria
0
129
Member Avatar for TailsTheFox

Hello, I'm trying to make a program, and can't figure out the correct way to use [ICODE]Form::Diologue[/ICODE] I allready know you have to do someting like this: [CODE] #include "Form2.h" Form::ShowDiologue(Form2()); [/CODE]

Member Avatar for TailsTheFox
0
93
Member Avatar for TheWolverine

Hi all, I've scoured the internet for examples that would allow me to figure out how to apply functors in my specific case, but I just can't seem to make the shift from the examples I find to figuring out how to use it for my own code. Here is …

Member Avatar for TheWolverine
0
95
Member Avatar for iokon

Hi to all! In the following code I am trying to implement a non-directed graph using adjacency lists. Even though there are no compilation errors, I don't get any results. When I am debugging the code it seems that there is a problem when I try to insert a second …

Member Avatar for iokon
0
2K
Member Avatar for iwanttolearnc

im trying my hand at calling c functions from python. im reading up the tutorial [URL="http://csl.sublevel3.org/C-functions-from-Python/"]http://csl.sublevel3.org/C-functions-from-Python/[/URL]. however part of the tutorial says that i should [QUOTE]Compiling dynamic libraries on Mac OS X is different from the usual gcc -shared you might be used to: gcc -dynamiclib -I/usr/include/python2.3/ -lpython2.3 -o myModule.dylib …

Member Avatar for gerard4143
0
230
Member Avatar for trebor-pl

Hi, i'm not very good at OOP, basically just started it. My program basically its like a system for a game shop, the main isn't fully done yet, however main isn't a problem. The other files must contain some kind of problem in them. Well enough of the talk, I'll …

Member Avatar for trebor-pl
0
338
Member Avatar for mahesh20081984

Hello, How can i create / edit the details that shown in the property -> version tab of an executable file . ie which can be taken from window's explorer mouse right click context of an exe file. The exe file was created using MINGW and qmake. thanks in advance …

Member Avatar for alexchen
0
87
Member Avatar for Zvjezdan23

[CODE]#include <iostream> #include <string> using namespace std; int main() { // A switch program that shows the user his input choice string word1 = "Achieve"; cout << "Welcome to Your AccuWeather Report Screen." << endl; cout << "Your choices are listed at the bottom." << endl; cout << "Number 1 …

Member Avatar for WaltP
0
136
Member Avatar for Rimojenkins

Sorry about the title, but I thought it would be interesting. Here is my problem. I am supposed to convert a certain input into a desired output. The input is 2 201101190930 F76.4 201101191330 C16.3 The first number is the number of strings in the file. It then goes YYYYMMDDHHMM …

Member Avatar for Rimojenkins
0
116
Member Avatar for ana_1234

I'm working on a program that reads a line of code and stores each word into an index or a array of string and I'm stuck. Its a small part of a larger project I must used cin.getline: [CODE]#include <iostream> #include <string> #include <cstring> #include <cctype> #include <iomanip> using namespace …

Member Avatar for griswolf
0
91
Member Avatar for BanKuZ

hi all, I have a class A that has a char* var, operator and methods. In addition I have a global func(char*s). I would like to run this code from the main function by adding operators to my class, I need help writing them. [CODE]A* pA; ... A** ppA = …

Member Avatar for BanKuZ
0
258
Member Avatar for NicAx64

circle.h [code] // // circle.h // defines the functions to draw circle. // #ifndef CIRCLE_H #define CIRCLE_H #include <windows.h> typedef struct tagCircle { int x; int y; int radius; } Circle; /* set the window handle */ void SetWindowHandle(HWND); /* set pixel @parms int x xposition @parms int y yposition …

2
499
Member Avatar for atticusr5

Hello, I have a program with the following variable: [CODE]char dateCode[13];[/CODE] and the this type of data is held by the variable -> 2011006+0000 Now if i want to print only 2011006, and ignore the + and everything after, is there a way to do that in c++? Would i …

Member Avatar for atticusr5
0
101
Member Avatar for Zvjezdan23
Member Avatar for rohan1020

I want to make a program that can take sound input from a microphone, and determine if the sound is one of three pitches (or maybe decibels). Can someone please help me to write a C++ program which could identify and process various characteristics(frequency, amplitude) of the sound from the …

Member Avatar for jonsca
0
130
Member Avatar for Ana_Developer

Hello everyone, I am using the code in the following website ([url]http://www.adp-gmbh.ch/win/misc/sockets.html#test[/url]) that is a ready Socket and Client class for connecting to a website. But in the Client.cpp code, if I put a query for Google instead of the host name in the send() method, I get a bad …

Member Avatar for drkybelk
0
207
Member Avatar for Fjolsvidr

I just wrote a little console app using the Visual C++ 2010 Express. But it doesn't run on other computers. I did a little research but it says I have to install redistributable package on the other pc, isn't there any other way to run the simple application?

Member Avatar for Fjolsvidr
0
125
Member Avatar for SolidSora

I'm working on a seat diagram program, and it's not reading the input how it should. Also when the user enters a seat it should change the letter to an X. The program isn't reading the input correctly. When I tell the program to print the seat the user picked, …

Member Avatar for SolidSora
0
174
Member Avatar for kevinyu

Hello people, I need some help regarding the insertion/deletion of data in the middle node. My problem is, if you insert a node on the middle, the existing middle node gets replaced (the nodes between the inserted node in the middle should only move left and right). And when I …

Member Avatar for Fbody
0
150
Member Avatar for dip7

Hi, I am have written a program in C but using Dev-C++ to run it. I have compiled my source code in c. however, my output window does not stay. I tried adding system(“PAUSE”); before return 0, but it does not work. My program has both return 1 and return …

Member Avatar for Ancient Dragon
0
95
Member Avatar for cbsinc

I need some pay for play tutoring. I have a jammed schedule and don't want someone to do my work for me, but need direct and timely answers to questions, immediately. I don't have time to trial and error, or tough love learning. I take good notes, learn fast, and …

Member Avatar for Ancient Dragon
0
101
Member Avatar for BimBam

Hi guys :) I'm currently trying to do something I don't have any experience with, and I did not really understand what ixQuick found for me .. So I try here, hoping someone shouts 'oh, done this million times, it's a piece of cake' ;) So, I'm using Visual Studio …

Member Avatar for BimBam
0
94
Member Avatar for elsiekins

Before people go why would i want to create an array of size 0 - this is due to writing a test program. at the moment i have two diffeent ways of doing - not sure which one is even slightly correct 1.[CODE]uint8_t * BufferB = new uint8_t[0]; uint8_t* p; …

Member Avatar for elsiekins
0
422
Member Avatar for Mr_PoP

Hey all, i made a socket that accepting connection from a game , in the game u should type in username and password , i can recive it bt , it's like ummmm encrypted letteers and numbers my question is where to look at so i can understand how to …

Member Avatar for Mr_PoP
0
64
Member Avatar for MasterGberry

I have spent all of yesterday and this morning trying to think of how to do this, and I am still stuck. I don't understand how I can take a std::vector<char> (bytes) and extract values from it by combining the bytes. I have read everything that people have posted but …

Member Avatar for MasterGberry
0
214
Member Avatar for teoh

[CODE]class StudentMarks { public: int Marks; StudentMarks(); StudentMarks(int iMarks); char grade(); }; #include"grade.h" #include<iostream> using namespace std; StudentMarks::StudentMarks(int) { int iMarks=0; } /*StudentMark::StudentMark(int iStudentNewmark) { iStudentmark=iStudentNewmark;*/ char StudentMarks::getgrade() { if(iMarks>=80 && iMarks<=100) { return 'A'; } else if(iMarks>=75 && iMarks<80) { return 'A-'; } else if(iMarks>=70 && iMarks<75) { return …

Member Avatar for Clinton Portis
0
134
Member Avatar for DanielWuVB

which programming tool will be better if I need to write the POS system ? Thanks guy ..

Member Avatar for johnpitter
0
116
Member Avatar for devin1pm

First of all, Im not too good at c++. so please take it easy on me. I try to change the password but i only want to change a certain password in the text file.But when the text file got re-write like only one new password exits. the whole file …

Member Avatar for JSPMA1988
0
668
Member Avatar for Nandomo

Okay, I was given a picture in bitmap format and a very brief explanation on seekp and seekg. And was told to write a program. I am supposed to make overwrite the image as its own negative and output in binary. I don't know where to even start, I know …

Member Avatar for Nandomo
0
132
Member Avatar for pseudorandom21

Using C++/CLI-- Is there a good way to return a value (not a DialogResult) from a form shown as a dialog? I plan to use Invoke on a method to update the previous form from within the dialog, if not. I also would like to thank the fine members of …

Member Avatar for Ancient Dragon
0
337
Member Avatar for Mayank23

how can i display all the account numbers that have been entered. it only shows the last account number entered, not any before it. heres the code- [code] #include <iostream> using namespace std; int main() { double deposit; double previous; double newtotal; double withdraw; int total; int number; int res; …

Member Avatar for Mayank23
0
189
Member Avatar for valeriy_zf

How to start using the GNU Octave libraries for Visual C++? I've read carefully the site but couldn't find any info how to start working with it in details. Especially I'm interested in this example: [url]http://www.gnu.org/software/octave/doc/interpreter/Nonlinear-Equations.html[/url] Starting from words: "Here is a complete example..." I wanna see this in C++ …

Member Avatar for Manlin86
0
3K
Member Avatar for Joey_Brown

Hello So I have a simple structure : [CODE] struct students { char name[30]; unsigned int noofcourses; char course[50]; char status[30]; }arr[50]; //50 students [/CODE] I would like to know is how could I read multiple courses in per student from memory.[CODE]Example: Joey Brown 4 Math$Chem$Phy$Cooking Enrolled m8!! [/CODE] So …

Member Avatar for Adak
0
176
Member Avatar for namelyia

hi.. i'm new here i try to do bingo program in separated file but my class name is not declare.. i search on internet on how to solve it but still gives me error can some one help me??? [CODE]#ifndef BINGO_H #define BINGO_H #include<iostream> #include<stdlib.h> #include <time.h> #include <string.h> using …

Member Avatar for namelyia
0
268
Member Avatar for atticusr5

Hello out there, I am trying to compile some simple code but am running into a weird error that I can not figure out terminate called after throwing an instance of 'std::ios_base::failure' what(): basic_ios::clear Aborted This is happening when I do an Infile>> read in the code below. What I …

Member Avatar for Fbody
0
5K
Member Avatar for Mayank23

i made a bank program, it askas the users to put in their account number. it works with a while loop. i ask for the person to enter 1 to start or 0 to stop. i need help on how to display all the account numbers that were entered once …

Member Avatar for Mayank23
0
117

The End.