49,766 Topics
![]() | |
okay so here's the little piece of code that would be useful in a sudoku program that i'm making... this function leftover is simply extracting the set minus of two arrays. i don't know if logic's been having any problem but i think its pretty simple clear. oh, and i'm … | |
i have problem only declaring struct variable. i declare a struct in struct.h file and i wan main.c and class.h also using the same variable. But the class.h file say the struct is undeclare.. example: struct.h [CODE]struct car{ int year;};[/CODE] main.c [CODE]#include <cstdlib> #include <iostream> #include "struct.h" #include "class.h" using … | |
It's my school project, I wrote this C++ program with file handling. I am getting these errors and I can't understand what's causing the errors, if anyone can rectify my program, that would be great. My program :- [CODE]#include<fstream.h> // for C++ and File-Handling functions #include<conio.h> // for getch() and … | |
i have just started learning c++ i just want a program to print ood & even from 1-100 please help me ![]() | |
| |
Hi everyone, i want to ask question about how to make a multiple tree in c++. So i want to make a tree which contain more than 2 child(or node or leaf), but i don't know how to make a tree like this. does anyone have an example about this? … | |
hi guys how are you ?! hope every thing is alright. well i want to make something like this [URL="http://www.coderun.com/"]one[/URL] can anyone help me how could i start in steps ? what books should i read ?! Thanks your help will be greatly appreciated. | |
I am having trouble with this one. Whenever I run it I enter in the grade value and it starts repeating over and over really fast. What is wrong with it? [CODE]# include <iostream> using namespace std; int main () { cout << "welcome to my GPA calculator\n" << endl; … | |
I commented on the code what is my doubt. I don´t know I can´t I simply use arq_linha_part >> parm; If I use that it returns me the error: 1>------ Build started: Project: Interface GaussSolve, Configuration: Debug Win32 ------ 1>Compiling... 1>Interface GaussSolve.cpp 1>c:\users\fernando\documents\visual studio 2008\projects\interface gausssolve\interface gausssolve\interface gausssolve.cpp(38) : error … | |
Hy. I have to make a program to crypt a text entered from the keyboard whith aes 256 , but i have problems when i try to split the text in two.I get a bad_ptr when i declare unsigned char** intext=new unsigned char* [16]; [CODE] #include<iostream> #include <fstream> #include<conio.h> #include … | |
I am pretty proficient in C++ and Java. I know that most progrmas could be written in either language. My question for those of you who have been out there for a while, do companies tend to use one programming language for certain types of programs? For example, is C++ … | |
plz send me some imp in c & c++ urgently my exam is after 2 days | |
My entrada.txt jas the following contents: [code] #Commented text #This should be used like: #Bar:Bar_number:Type_of_the_bar; # # Bar:1:PV:1.05 [/code] So the lines that starts with # are commented so the program will not process them. Everything is working fine, but when I used getline() to delimit the string on ":" … | |
What is the correct way to declare a multidimensional array. I tried like this [CODE]unsigned char** intext=new unsigned char*[16];[/CODE] but i get a bad_ptr. | |
Hi, I´m having problem while converting char to string. [code=c] #include "stdafx.h" #include <fstream> #include <cstdio> #include <iostream> int main() { std::ifstream arquivo("entrada.txt"); if (!arquivo) { std::cout << "Arquivo não encontrado" << std::endl<< std::endl; system("PAUSE"); exit(0); } std::string token; char arquivo_linha[255]; while(arquivo) { arquivo.getline(arquivo_linha,255); if (arquivo_linha[0] != 35) { token … | |
I´m using Visual C++ Studio and when I include another .cpp file it doesn´t takes all the what have been included before. Here is an example: main.cpp [code=c] #include <iostream> #include <string> #include <sstream> #include "readtext.cpp" int main() { teste(); return 0; } //readtext.cpp void text() { printf("teste"); } [/code] … | |
Can anyone tell me what GUI to use? And is there a GUI similar or same like standard library? Thanks in advance. | |
Well, I wonder HOW to make an explode() function from PHP in C++ For those who don't know. explode($separator, $string) breaks given $string through given $separator for example: [code] $string = "Hello world!"; $result = explode(" ", $string); echo $result[0]; //IT will give us HELLO word echo $result[1]; //IT will … | |
Im working on a program to get single characters from a string and i guess im doing it wrong but i was using strok() to tokenize the string in the hopes that it would do so but anyway this is what ive got so far and before you ask its … | |
Hi, I have to calculate the exponetial of a large (on the order of 10^5) negative number. I tried using exp(), the exponential function from the cmath library, but I get an answer of 0. So, I tried to use the power series for the exponential function. For numbers from … | |
I please want to ask if anybody knows how to install allegro without use of terminal.. | |
Hi everybody . i have a problem that i have been trying to solve for weeks can u help. this is bonus problem given to me by my professor in college. hers is the description: menu driven library: 1. list books 2. add books 3. find books a. by id … | |
i need some help: i have something like: word1:word2:word3:word4 ...read from a file,how can i do,when i read this line,each word delimit by ":" to put into a string.... string str1,str2,str3,str4; str1 = word1; ........... str4 = word4; sorry for my english i hope eu understand | |
Ok, I am about 20+ hours into this utterly confusing idea of link lists. The classes I have are listed below. I cannot for the life of me understand how I would write a reverse function. My office floor is cluttered with printouts and scribbles from trying to make this … | |
No programs are running.Both is Visual Studio and Codeblocks... both are showing the following error, [B]LINK : fatal error LNK1104: cannot open file 'kernel32.lib'[/B] I have google it, some say setting environment to "C:\Program Files\Microsoft SDKs\Windows\v5.0" or reinstalling visual studio, or editing registry key "HKEY_CURRENT_USER\SOFTWARE\Microsoft\MicrosoftSDKs\Windows\CurrentInstallFolder"(i didn't find any MicrosoftSDKs under … | |
Why is the constructor called from top to bottom rather than bottom to top ???? | |
I read that the initialisation of the vptr is done by the default constructor automatically . What happens when u provide implementation for the default constructor . Is the initialisation code added automatically ??? | |
I have a file over 100 Kb long. I want to perform operations on successive batches of 256 characters. [CODE] int fs=0; char ss[32556]; ifstream nm,nm1; nm1.open("as86.txt"); if(nm1.is_open()) { nm1.seekg(0, ios::end ); fs = nm1.tellg(); } nm1.close(); nm.open("as86.txt"); nm.read(ss,fs+1); nm.close(); cout << endl << fs << endl; ofstream mn; mn.open("as86.txt"); … | |
I know this gets asked a lot but i want to make a program that sends me some form of an alert at a certain time of day. I am using windows 1. i want it too run invisibly so no windows, doesn't show in task bar, or task manger … | |
hey please can anybody guide me how we can take input from the command prompt as we do in C++ and Java. I can take input using .dat files but I want the user to give input in the command prompt. I will be very thankful. |
The End.