Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
0 Endorsements
~7K People Reached
Favorite Forums
Favorite Tags
c++ x 9
c x 2

8 Posted Topics

Member Avatar for GmatCat
Member Avatar for jacob21

here is the code for reversibg string [CODE] #include<stdio.h> #include<string.h> char * reverString( char *str) { int strsize, endword, wordReadPos writPos = 0; strsize = strlen(str) -1; char * buffer = (char*) malloc( strsize + 2); while(strsize > 0) { if(str[strsize] == ' ') { buffer[strsize++] = str[strsize--]; } else …

Member Avatar for gerard4143
0
112
Member Avatar for erogol

both number are in the same string, this is what you do [CODE] int main(void) { FILE *fp; char ch[STR_SIZE]; int aInt; int bInt; fp = fopen("erogol.k","r"); fgets(ch, STR_SIZE, fp); aInt = atoi(ch[0]); bInt = atoi(ch[1]); printf("%d \n",bInt+aInt); return EXIT_SUCCESS; } [/CODE]

Member Avatar for gerard4143
0
4K
Member Avatar for skorm909

what you need to do is change you if statement to switch statement and your while as follow: bool done = false while(!done){ put the code inside........} [CODE] cin >> choice; switch(choice){ case 1: ADD(); break; case 2: SUB(); break; case 3: MULT(); break; case 4: DIV(); break; case 5: …

Member Avatar for Jason Giggs
0
166
Member Avatar for theashman88

below is a code, hope it helps. [QUOTE]#include <iostream> #include <string> using namespace std; int main() { string str1 = "606", str2 = "605" str3; size_t pos; cout << "Please enter zip code: "; string = zipCode; getline(cin,zipCode); pos = zipCode.find("606"); str3 = zipCode.substr(pos + 3); if (str3 == str1 …

Member Avatar for dnambembe
0
109
Member Avatar for pichi20
Member Avatar for pichi20
0
1K
Member Avatar for dnambembe

can anybody tell what's wrong with this code! //=========================================================================== // hybrid.cpp --this file implement the hybridlist class // Time-stamp: <2010-10-29 18:52:46 Dnambembe> // To compile: // g++ hybrid.cpp // Copyright (c) 2010 by Domingos Nambembe. All rights reserved. //=========================================================================== #include<iostream> #include<cstddef> //need NULL #include"hybrid.h" using namespace std; typedef NodeType* NodePtr; …

Member Avatar for dnambembe
0
128
Member Avatar for dnambembe

Hi, I am writing a code that reads input from user to create a linked list database at the same, time it write the data received in to binary file. when I run the program is supposed to prompt the user to enter the data for ten time, however the …

Member Avatar for dnambembe
0
1K

The End.