49,761 Topics
| |
Hi ! I'm trying to learn about sockets using winsock in c++. What I want to do is have one computer (my computer) act as a mini server for my friend to connect to directly from his house (different ISP). I am wondering if it is possible using sockets to … | |
Hello .. Afternoon, happy, I have a test tomorrow and I want your help in the creation of code: we would like to counter and find the maximum , Minumum for linked list ? PLZ help me :) | |
I get an infinite loop if i enter a char/string during the switch statement, so i made an exception to catch anything other then integers. But, i still get the infinite loop. I may be doing something wrong so any help would be great. [CODE] #include <iostream> #include <string> #include … | |
[code]for(int i=0;i<=c;i++) { l=0; if(strcmp(findedge(tst[i],dfa[0][j]),"null")!=0) { strcpy(t1,findedge(tst[i],dfa[0][j])); //l=strlen(temp); strcat(temp,","); strcat(temp,t1); //temp[l+1]='\0'; //temp[l]=','; } } [/code] When I try to append comma or some other symbol to temp, a segmentation fault occurs. If that step is omitted everything works perfectly. This is code is from my program to convert NFA to … | |
Hi, why does the two functions factorial and factorial2 only return the right factorial if the input is 12 or less ? [CODE=c] #include "iostream" using namespace std; int factorial(int n){ if (n==0){ return 1; } else{ return n*factorial(n-1); } } int factorial2 ( int x ) { int p … | |
i store student information(name grade mark) in database....how to print student who score less than 50.0 mark and who score A ,Compute the average mark of students in the class, number of students who scored less than 50.0 marks,Print out the information for all ten students and Given a student … | |
In your opinion what is the fastest c++ compiler? I have found the gnu's compiler on my schools linux machines tobe very fast but i personally prefer the windows enviroment, is there any fast compilers for windows , something faster then g++ and mingw? | |
[B]Hi, guys can you help on how to make a program which hotel management system using C++? I don't know where to start or could you pls post the source codes in a simple structure so that I can understand it easily I am an I.T student here in the … | |
i am a beginner in c++ and i am looking a web that is like a wiki for c++ that have information on every or most functions,variable and other in c++ | |
How do you make shadows in OpenGL. I have been using the NeHe tutorials, but I do not understand their shadow lesson. Can anybody help? | |
[CODE] // a code to produce matrix style affect #include "stdafx.h" #include<iostream> using namespace std; int modulus(int Number, int number); char getchar(int lowerlimit, char a, int upperlimit); int modulus(int Number, int number) { int q=Number/number; return Number-(q*number); } char getchar(int lowerlimit, char a, int upperlimit) { return (a+modulus(lowerlimit,upperlimit)); } int … | |
i have an "add function" that adds names alphabetically to a sorted linked list. the list is already made in this format : Dani Web Mark Markos Michael David Zebra Zebra . . etc if i add a node : adam ( it goes to the end of the list … | |
I've got this intro C++ class and I can't figure out what the teacher is looking for, please Help Me if you can. 1) Each group turned in pseudocode for an in class project with five or six steps to run a baseball game. You are to turn the pseudocode … | |
Hey guys I'm doing a fun little program that will use the character roster from league of legends. Basically I am going to have all the champion data like health, attack power, and type (early, mid or late game) stored and then compare the characters and depending on what the … | |
Hi all. I'm using DragonFireSDK to make an iPhone app, which means that I can't use any external libraries other than the SDK one. I am trying to get an integer variable for score to a function which will display text on the screen. However, that function takes a char* … | |
Hello i need help with a program which allows the user random read access to any entry of the array. If the user attempts to read outside the useful region, your data structure should return a 0. Also It allows the user random write access to the useful region only. … | |
Would appreciate any help on the attached code to get it to function properly. Think I am having a brain fart or the brain is completely fried at this point. Thanks! The program is to take an input string and outputs the series of International Civil Aviation Organization Alphabet(ICAO) words … | |
I need to do a chem quiz that contain a science calculator n a small game,but there is some problem,got any idea? [CODE]#include<stdio.h> #include<math.h> #include<stdlib.h> #include<time.h> #include<windows.h> int main (void) { int option,question,i,count,z=0; char choice,game,quit; int selection; float pressure,volume,number_of_mol,temperature; int exit; char answer1,answer2,answer3,answer4,answer5,answer6,answer7,answer8,answer9,answer10,answer11,answer12,answer13,answer14,answer15,answer16,answer17,answer18,answer19,answer20; int guess,jackpot=8; // SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_BLUE); … | |
Hello, I have 2 massive matrix's and I need to compare one matrix with another.. Now, I have come up with a solution that takes a 5x5 block of the matrix1 and compares it with a 5x5 block of matrix2, this happens until the end of both matrix's.. I'm confused … | |
Hey folks in my program is to encrypt a string.i then declared a function outside of the program to preserve the spaces which have been encrypted. but i dont know how to return my function to the main program to output the encrypted string with the spaces. cheers guys hope … | |
Bit of a noob question this. I am using a library which has this function: [ICODE]int TextAdd(int x, int y, char *text, int font);[/ICODE] I need to use this function to display a score. I have the variable [ICODE]int score[/ICODE] and I would like to put it into that function … | |
I'm writing a program that generates random arithmetic questions, the user has 10 lifelines, I want my program to display the lifelines (no of chances left) at the rightmost corner of the console window without it being scrollable i.e. It doesn't move neither up nor down when scrolled. I dont … | |
[CODE]#include <iostream> #include <string.h> #include <ctype.h> using namespace std; void Removespaces(char clear[], char cipher[],int x,int i); void Removevowels(char clear[],char cipher[],int x,int i); int main() { char clear[256]; char cipher[256]; int x,i; int opt; cout<<"Encryption (1) 0r Decryption (2):"<<endl; cin>>opt; cin.ignore(); if(opt==1) { cout<<" Enter a string(sentence):"; cin.getline(clear,sizeof(clear)); // calling the … | |
Hi, I'm having an issue in my program when I try to call delete in my destructor. Can someone take a look and see what I doing wrong? I've looked it over and over but I just can't figure out what's wrong. destructor code: [CODE] StudentRecord::~StudentRecord(){ // Destructor delete[] m_firstName; … | |
How can I check if a template's parameter is empty? Or of a "certain type"? I'd prefer to check if it's empty or not rather than the type because if the wrong type is entered, it'd throw an error anyway.. But I definitely need to know if the parameter passed … | |
is there a manipulator in C++ that do that ? if not how can i cout my numbers formatted that way . if the number is larger than 999.99 i want to put a comma after the first 3 digits and after the 6 digits ..etc x = 99456 Example … | |
[CODE] // a code to produce matrix style affect #include "stdafx.h" #include<iostream> using namespace std; int modulus(int Number, int number); char getchar(int lowerlimit, char a, int upperlimit); int modulus(int Number, int number) { int q=Number/number; return Number-(q*number); } char getchar(int lowerlimit, char a, int upperlimit) { return (a+modulus(lowerlimit,upperlimit)); } int … | |
The code can do the talking. main.cpp [CODE] #include "test.h" #include <iostream> #include <string> #define NL "\n" //"NL" = "New Line"(move the pointer to the next line) #define SL "\n\n" //"SL" = "Skip Line"(move the pointer 2 lines) int main() { Cool_Object.cool_function(); return 0; } [/CODE] test.h [CODE] #ifndef TEST_H … | |
Hi I was wondering why I have an error in this program every time I try to do a long encryption. For example, encrypting an ebook or long document. I only occurs in the advanced encryption and advanced decryption functions. I'm pretty sure it has something to do with memory … | |
I have to write an interpreter for tristate logic as a Uni assignment. I got most of the things down, like expression tree and such, there is just one thing that's bugging me, that is input, or a particular part of it. The thing is, in the expression there can … |
The End.