49,761 Topics
| |
Hello, Yes, I am a new C++ student and yes I have tried looking for this topic already. I'm very interested to know if there is a way to create a text array that would produce random output akin to a magic 8 ball? Here's what I want to do... … | |
Hello! :) I'm having some trouble including header files in my project. This is my three files: main.cpp: [code=c++] #include <iostream> #include <string> #include "functions.h" using namespace std; int main() {}[/code] functions.h: [code=c++] #include <iostream> #include <string> using namespace std; void functionSplit(string str);[/code] functions.cpp: [code=c++] #include "functions.h" using namespace std; … | |
Hello All : I tried to write a simple program in C++ for encrypt a word using a keyword and a key depending on an alphabet ,for example keyword:HELO Key : D I want to genrate the cipher alphabet by puts the positions of letters of the keyword(HELO) in the … | |
Hi all, i'm reading a file path from a serevr & going to read the contents in that file. i created a ifstream object.but the problem is if the file path is c:\txt.txt,it doesn't read it as a file path.it reads \t as the tab.Is there any way to avoid … | |
I am filling a char array 2 bytes at a time. I want to now add an integer that can be up to 4 bytes. Is there an easy way to split this integer into 2, 2 byte chars? For example 2200 into 0x08 and 0x98? Thanks. | |
Hello Everyone , I am writing a code in which i search a char array and look at what is missing in the array i mean what letters are missing in the array. I worked out a small code but i seem to have some error in the answer though … | |
Hi .... i'm getting the following error " 'buildListForward undeclared' when trying to compile this program. Please help ! [code=cplusplus] //Linked lists //Pg.288 #include <iostream> using namespace std; nodeType* buildListForward(); int main() { buildListForward(); nodeType* buildListForward() { nodeType *first, *newnode, *last; int num; cout << "Enter a list of integers … | |
| |
Loader error (0000): unrecognized error i get this error message when ever i start the Turbo C++ 4.0j IDE. What could be the problem? i tried reinstalling the software but in vain. it was working fine though before. | |
[code=cplusplus] #include <iostream> #include <vector> using namespace std; class ctcChanID { public: void GetInfo(ctcChanID *m); int chanID; int type; string DN; int clientID; }; void ctcChanID::GetInfo(ctcChanID *m) { } int main() { vector<ctcChanID*> _ctc; for(int i = 0; i < 2 ; i++) { ctcChanID *a = new ctcChanID; cout … | |
I understand that title was rather vague, but it still holds true. Lurking these forums I have noticed how incomplete my 2 year education on C++ really is, and I am asking for your help in area's, maybe just pointing me to some resources, etc. First off i am using … | |
If you could help I'll be very grateful! Someone suggested FtoC, but I duno... | |
AYBODY KNOWS WHY THIS PROGRAM IS ABNORMAL? [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import "std" namespace into global namespace struct exam { string examid; vector <int> total; }; int myfile; int … | |
I can't seem to figure out why it keeps repeating level one anyone got a suggestion on how to fix it? [CODE=cplusplus]#include <iostream.h> #include <stdio.h> #include <windows.h> #include <stdlib.h> #include <conio.h> #include <ctype.h> int mx=14; int my=1; int i, j; char direction = ' '; char facing = 'S'; char … | |
I've written a program to produce a random sentence. I'm having trouble converting the first letter of the first word into uppercase. Don't know where to go from here. Can anyone help? [CODE=cplusplus] #include <stdio.h> #include <string.h> #include <time.h> #include <stdlib.h> #include <ctype.h> void firstword( char *article[5], char *sentence[6]); void … | |
hi, i am new here. hello hello i have a few question about c++ (concept questions) can someone help me thanks. 1. if i want to make a boolean statement inside a class, do i need to have a accessor and mutator for it? and how do i declare it … | |
I had a global variable that could be seen by all of my functions. I was getting too many functions in the same file, so I made functions.h and functions.cpp. I put the function definitions in functions.cpp and the declarations in functions.h. In main.cpp, I include functions.h. The problem is, … | |
This for loop below sets 5 checkboxes in a checkedListBox. What I wonder is that when running the code below, 5 checkboxes is created and the checkboxes are "unchecked". What I am wondering is how it is possible to make these 5 created checkboxes "checked" and how it is possible … | |
Hi i have been making two programs: one that sends a file's filebuf made into a char*, and another that receives that and writes it to a file. They're like exe sending programs. I can send the char* and write it onto the console using cout.write(), but when I try … | |
I was wondering if there is a way to convert an OLE date and time into a readable format using c++? I have looked at some of what time.h offers but cant find anything to convert OLE thanks | |
Hey, i saw this thread about some one needing homework help but it was solved so i made one and it's not real homework but i was wondering how i could do something if the user entered a letter eg "e". [CODE=C++]#include <iostream> using namespace std; int main() { int … | |
Hey guys i'm still having trouble with my bubble sort in else if(choice==2). Where am i going wrong i'm about ready to pull my hair out #include <iostream> #include <iomanip> #include <algorithm> using namespace std; int main() { int i,num[20],n,j,choice,tmp; cout<< "Please enter 20 integers"; for (i=0; i<20; i++) { … | |
| Hi, is there any way how to extract resource data from executable file or dll? I need this, for example to extract icons (all sizes and depths) to any ico file. I found ExtractAssociatedIcon in Delphi, but this should be the same in C++. But when I use this, I'll … |
Hi all, So i'm creating a program that will read a file into a linked list. And the user will be able to add, remove and display the list. Im suppose to create a search function in order to find the link to remove or add or display. Here is … | |
I am trying to check the input for 8 bit an unsigned integer is this the right why to go about it? struct int8bit { unsigned int number : 8; } . | |
hello; while downloading the Microsoft visual C++ from a CD , a massage appers to me saying that it can not read a specific file and then another massege after the installing complate saying that the installation was not sucsseful the problem start then in the program it self , … | |
Hi guys, I need to understand the concept of inheritance in Oops. Can any one explain with real life example the use of inheritence to enhance a super class. It will be very helfull to me if you can explain me the use of inheritence to build a simple car. … | |
i wanna know how to set an certain number with commas, for instance if i had this [CODE] #include <iostream> #include <iomanip> using namespace std; int main() { int numItems; double total; const double costOfItems = 1050; cout << "enter number of items "; cin >> numItems; total = costOfItems … | |
I have created an iterator for a vector and i need to create a return type for an object found in the vector. vector<Student>::iterator StudentRecord::find(const string& studentName){ vector<Student>::iterator find; for(find = students.begin(); find != students.end(); find++) { if(find->getName() == studentName){ return find; // Not sure if i am allowed to … | |
hello i am building an application in Visual c++ 6 and i want to save some variable values. i tried in all ways, until i try just to save a value that i declared right in the "Serialize" function of my CDocument class : [code=cplusplus] void CDiplomaDoc::Serialize(CArchive& ar) { r=3; … |
The End.