General C++ Programming - February 2014 (Page 13)

Why my do-while loop is not doing as I wanted?
 
I had an idea to make a program that will ask your password again if u type the following password,for example:password,abc123,qwerty. I try to apply a do-...
[1 reply] : Why are you avoiding std::string ? Your issue is that you are compar... (by LB)
Can't write into HKLM Registry
 
Hello everyone, I'm trying to create a key in HKEY_LOCAL_MACHINE - without success: I get the messagebox "The function failed". This means that the If-conditio...
[1 reply] : By now I solved the problem. In fact I wanted to create a Key under HK... (by theRunner)
assigning my values to a two dimensional array
 
hello all, I'm trying to write a very simple program that takes values in through variables, and stores those values in a two dimensional array. The values ...
[2 replies] Last: yea, I realize what I was asking was stupid. but it was late when I a... (by mattig89ch)
by Malrig
Creating function for simple choices
 
Hey I am trying to simplify my code by creating a function which takes an input then checks whether it is "y" or "n" then outputs either 1 or 0 depending on the...
[2 replies] Last: Cheers just wanted to check I didn't make some awful error or a progra... (by Malrig)
by mora15
ignoreCaseCompare().
 
Can someone help me write a function that is called ignoreCaseCompare() that has two character (char) parameters. The function should return true if the two cha...
[2 replies] Last: @mora15 This is simply a program where you enter two variables and t... (by mora14)
How destructor is executed here?
 
#include<iostream> using namespace std; class singleton { int a ; static int count; //static singleton*ptr; singleton():a(0)...
[3 replies] Last: Checkout: http://stackoverflow.com/questions/2204608/does-c-call-destr... (by ShodanHo)
by xcyl40
Cryptogram Help!
 
I need some help with a cryptogram, where you match a letter to another letter. I'm a beginner's learner, so my attempt is fairly basic. I can't seem to figu...
[no replies]
Range Based For Loops ยง 6.5.4 (86)
 
In Particular: [quote=N3337]86) this ensures that a top-level comma operator cannot be reinterpreted as a delimiter between init-declarators in the decla- rati...
[10 replies] Last: > I'm sure you would have given me a direct answer by now I've given... (by JLBorges)
Is \n in a char array considered a single character?
 
In the below char array: char text1 = "\aHello,\n\tWorld! Mistakee\b was \"Extra 'e'\"!\n" would \a or \n be treated as a single character, and if so, ...
[3 replies] Last: > if so, then how does the compiler know that the backslash and the 'a... (by JLBorges)
null terminator same as null and thus falsy value?
 
I am looking at one of the functions of an exercise: void escape(char * s, char * t) { int i, j; i = j = 0; while ( t ) { ...
[1 reply] : Yes, a null character will get evaluated to false . (by long double main)
by zsmash
How to make shorter name output
 
#include <windows.h> void gotoxy(int x,int y); int main(int argc, char *argv ) { char urname ,surname ,fullname ,nput; int cntr; cntr=0; ...
[4 replies] Last: so do i need to change those void gotoxy function into your function g... (by zsmash)
How to square and cube a number in my program?
 
#include <iostream> #include <conio.h> #include <iostream> using namespace std; int main() { FILE *pFile, *upperFile, *lowerFile, *symbolFile, *squareFile,...
[5 replies] Last: Thanks anyways :D (by galangjosh)
I need help urgently please!!
 
Examine the requirements and construct code, including the selection (if / switch) to fulfill the requirements stated in each part: program prompts the user to...
[1 reply] : Try working the steps to the solutions out on paper first in plain lan... (by wildblue)
by zre
concurrent_vector returns invalid data
 
using : VC++ 2013 concurrency::concurrent_vector<datanode*> dtnodelst Occasionally when I do dtnodelst->at(i) .... I am getting an invalid address (0XCD...
[no replies]
HomeWork help
 
How do i know what temperature data to use? Do i just make it up and make a file that stores temperatures to be read by my program? Write a program that uses ...
[no replies]
Issue with returning variables with if statments
 
Ive been getting an odd error with this code when I try to compile it, as well as Im not quite sure as how to return my variable "compType" as a char type. ...
[1 reply] : Well there is a fair amount of issues I see here. So I will start off ... (by kingkong200)
output and input queues
 
I am reading the documentation for the SetCommState function: http://msdn.microsoft.com/en-us/library/aa363436%28VS.85%29.aspx What does it mean by "outpu...
[no replies]
Nested while loops.
 
So I have to write a program that when executed produces something like this: the number after the 9th digit should be a 0 then start all over again from 1. ...
[5 replies] Last: I think you still have an infinite loop there. If the user enters 5 - ... (by wildblue)
by Gyiove
SDL set window icon ( ohter ways )
 
Hello everyone! This is how i set icon right now: SDL_Surface*image; image = fp_SDL_LoadBMP_RW(fp_SDL_RWFromFile("resource/fantasyplanet.bmp", "rb"), 1); fp...
[4 replies] Last: [quote=Gyiove]Anyway. I readed somewhere that SDL_image cant be used S... (by Peter87)
Program "skips" first input value
 
This program is for a scrabble board. You enter a sentence and it counts the number of a,g,m,f,k,j letters used in the sentence then tallys the total points. Th...
[1 reply] : Try removing line 12 and see what happens. As it stands, the input yo... (by long double main)
February 2014 Pages: 1... 1112131415... 33
  Archived months: [jan2014] [mar2014]

This is an archived page. To post a new message, go to the current page.