User
Pass
2FA
 
 

Problema Program C++

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database
Author Message2082
zbang !!

[Account disabled]



Status: Offline
(since 10-12-2015 12:33)
Joined: 20 Sep 2011
Posts: 1412, Topics: 251
Location: precis

Reputation: 96.4
Votes: 66

 
Post Posted: 15-07-2013, 11:49:20 | Translate post to: ... (Click for more languages)

Salut !
Am facut si eu un program C++ si nu merge cum vreau eu.
Code:

#include <stdio.h>
#include <conio.h>

void main()
{
int getch(void);
if ("t");
printf(Octaw0w);
}

Acest mic program ar fii trebuit (dupa mine) sa citeasca ce scrie pe tastatura si atunci cand este apasata tasta "t" sa apara textul "Octaw0w" .
Nu sariti pe mine cu chestii de genul "Vai, ce prost esti!" sunt la stadiul de invatat abia - .
Pentru cei mai experimentati, care stiu:
As dori sa facet ca programelul sa mearga cum am spus eu, si sa se bage in autoexec , sa porneasca odata cu pc-ul (nu stiu cum si vreau sa invat) , iar atunci cand este apasata tasta "t" sa apara Octaw0w , dar sa nu apara in fereastra aia standard cu negru , ci sa apara doar scrisul, daca se poate.
Merci !
O zi buna !

0 0
  
Back to top
View user's profile Send private message
In2ition

[Globul de cristal]



Status: Offline
(since 30-04-2018 18:33)
Joined: 28 Aug 2006
Posts: 11769, Topics: 315
Location: Galati

Reputation: 1842.7
Votes: 199

Post Posted: 15-07-2013, 14:35:04 | Translate post to: ... (Click for more languages)

Code:

#include<stdio.h>
#include<conio.h>

int main()
{
printf("introdu tasta ");
while (1)
{
    if ('t' == getchar())
       printf("Octaw0w");
}
}


Asta iti afiseaza cand apesi t. Nu stiu cum sa-l integrez in windows si sa-ti afiseze de fiecare data cand apesi tasta. Poate sunt si alte variante.


We stop looking for monsters under the bed when we realize they're inside of us.

nr913 wrote:
no really, dacã nu era așa țãrancã, și dacã era în bucurești, o luam de nevastã

0 0
  
Back to top
View user's profile Send private message
zbang !!

[Account disabled]



Status: Offline
(since 10-12-2015 12:33)
Joined: 20 Sep 2011
Posts: 1412, Topics: 251
Location: precis

Reputation: 96.4
Votes: 66

 
Post Posted: 15-07-2013, 15:20:53 | Translate post to: ... (Click for more languages)

Cannot convert "int" to "char *" .
0 0
  
Back to top
View user's profile Send private message
In2ition

[Globul de cristal]



Status: Offline
(since 30-04-2018 18:33)
Joined: 28 Aug 2006
Posts: 11769, Topics: 315
Location: Galati

Reputation: 1842.7
Votes: 199

Post Posted: 15-07-2013, 15:25:49 | Translate post to: ... (Click for more languages)

Ce IDE folosesti? Ai dat c/p la ce am pus eu mai sus?

We stop looking for monsters under the bed when we realize they're inside of us.

nr913 wrote:
no really, dacã nu era așa țãrancã, și dacã era în bucurești, o luam de nevastã

0 0
  
Back to top
View user's profile Send private message
zbang !!

[Account disabled]



Status: Offline
(since 10-12-2015 12:33)
Joined: 20 Sep 2011
Posts: 1412, Topics: 251
Location: precis

Reputation: 96.4
Votes: 66

 
Post Posted: 15-07-2013, 15:50:22 | Translate post to: ... (Click for more languages)

Orice buton apas (inclusiv t) apare litera, nicidecum "Octaw0w" .
0 0
  
Back to top
View user's profile Send private message
mayavin

[Future World]



Status: Offline
(since 23-06-2018 15:49)
Joined: 08 Mar 2012
Posts: 3033, Topics: 173
Location: Cluj-Napoca

Reputation: 119.8
Votes: 48

Post Posted: 15-07-2013, 18:37:17 | Translate post to: ... (Click for more languages)

zbang !! wrote:
Orice buton apas (inclusiv t) apare litera, nicidecum "Octaw0w" .


Apasa Enter dupa ce introduci litera/cifra etc.

PS: Asta e limbaj C, nu C++

0 0
  
Back to top
View user's profile Send private message
zbang !!

[Account disabled]



Status: Offline
(since 10-12-2015 12:33)
Joined: 20 Sep 2011
Posts: 1412, Topics: 251
Location: precis

Reputation: 96.4
Votes: 66

 
Post Posted: 15-07-2013, 19:14:14 | Translate post to: ... (Click for more languages)

Nu este ce vreau.
Nu vreau sa para acel .exe , si sa apesi o tasta si sa apesi "t" .
Eu vreau sa fie o "farsa" pentru un coleg, atunci cand deschide programul sa ruleze singur in fundal iar atunci cand apasa "t" sa apara pe ecran Octaw0w .

0 0
  
Back to top
View user's profile Send private message
koltzu
[Banned user]


Banned


Status: Offline
(since 24-10-2013 15:18)
Joined: 24 Oct 2006
Posts: 6632, Topics: 170
Location: Romania

Reputation: 847.9
Votes: 94

 
Post Posted: 15-07-2013, 19:46:23 | Translate post to: ... (Click for more languages)

Nu prea ai cum in C++.
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 15-07-2013, 22:11:24 | Translate post to: ... (Click for more languages)

Ba se poate și în C++, numa' cã pentru asta trebuie sã stãpânești bine limbajul și API-ul de windows. Cel puțin.

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
koltzu
[Banned user]


Banned


Status: Offline
(since 24-10-2013 15:18)
Joined: 24 Oct 2006
Posts: 6632, Topics: 170
Location: Romania

Reputation: 847.9
Votes: 94

 
Post Posted: 15-07-2013, 22:15:21 | Translate post to: ... (Click for more languages)

Eu ziceam de el ca nu prea are cum, nu ca un master C++ wizard level 108 nu poate.
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database  


The time now is 06-05-2024, 01:40:43
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x